I think that the previous response, although thorough was a little frightening and unrealistic.
Any doctor will tell you that a yeast infection does not prevent your chances of getting pregnant and in actuality once you become pregnant you are more prone to contracting a yeast infections because your body goes through hormonal changes. Increased sugar content in vaginal secretions will allow your yeast to feed on the sugar and grow, causing an imbalance of too much yeast and therefore an infection.
So if you're trying to get pregnant try to clear the infection before conception, but you have nothing to worry about.
Once pregnant if you do get persistent or reoccurring infections I would ask your doctor about "THRUSH" which is the only issue I have come across where the yeast infection can possibly pass to your baby's mouth during delivery, but again this is completely curable and not a huge concern.
So be calm and don't let anyone use scare tactics to intimidate you and cause anxiety about issues that are not of any serious concern. Good Luck!!