Yeast infection/bacterial vaginitis

Ula
If you have sex with either one of these without knowing could you pass it to your partner? And also if you get cured from it does your partner have to take meds too?