My ds and I battled thrush in the first few months of his life too. I was anemic (I lost a lot of blood during delivery) and had low thyroid so my body wasn't functioning normally. Ds got it first (it is visible on the tongue) so my midwife/naturopath painted my nipples and ds's tongue with gentian violet. (you can get this in a pharmacy) She also recommended cutting out sweet foods (grains, sugar, juice,etc) and taking probiotics (as suggested by moongoddess above) so I eliminated white rice and started taking acidophilus pills and giving a bit of acidophilus powder to ds. But the thrush got worse. Ds still had it and my nipples started to hurt. My naturopath prescribed oral liquid Nystatin for DS and Nystatin nipple cream for me. But the infection travelled up into my breasts and the pain was so bad when ds latched on that I screamed and ds wouldn't latch on again for about 24hrs. My breasts got blocked up and had to apply hot compresses and pump to drain my breasts. Anyway, at this point my naturopath at the urging of my LC referred me to an MD who prescribed Diflucan. The thrush went away for the course of this treatment but reappeared again when I stopped taking it. Finally my naturopath gave me GRAPEFRUIT SEED EXTRACT. The miracle cure. I wish I had taken it from the beginning! I took 10 drops of the solution in juice three times a day for quite some time (2 mo). I would try to wean off of it but the thrush would come back so I kept taking it. My naturopath said that the yeast don't get resistant to it. You can take it for as long as you need to. Finally one day I didn't need it anymore.
Even if you aren't sure if it is thrush you could use grapefruit seed extract. It doesn't hurt anything. It works quickly. You will notice it working right away (within hours). And you can take it for as long as you need to.