Yeast infection?

Vanessa • 21. 1 baby, due with #2 02/07/20. Married

So I’m 37 weeks and 2.5 cm dilated. I had my appointment yesterday and was told I have a yeast infection.

Anyways, I was prescribed the medicine.

My question is, I know it’s safe to use while I’m dilated, but what if my water breaks? Is that still okay to use? It’s for 7 days, and I know I won’t obvi be able to predict when baby comes, but I had my daughter at 37+5. So I was just wondering what would happen if my water breaks while I’m treating the yeast infection.