Can treating a yeast infection during ovulation affect your chances of pregnancy?

No, they have no affect on each other. But it's probably not the best thing for your yeast infection to have sex. It could make your worse or spread to your partner.