During my pregnancy, I had to be so careful with my diet and medicines. I never took any antibiotic on my own because some can affect folic acid levels. Please ask your doctor before taking any such pills.
I totally understand how scary it is when you have an infection and don't know which medicine is safe. Please don't take trimethoprim or any tablet without asking your gynac first. Your baby's safety is everything, so let the doctor decide the best cure.
I honestly don't know much about trimethoprim safety so I won't give any medical advice, but my gynac always told me to check with her before taking even a single pill. I'd highly suggest calling your doctor's clinic to be 100% sure.
I remember panicking when I got a UTI and was prescribed an antibiotic. It turns out doctors know exactly what is safe for each trimester, so trimethoprim should only be taken if your doctor specifically prescribed it. Just trust your gynac and don't worry!
Beti, in pregnancy we must be very careful with such strong medicines. Please don't take any antibiotic like trimethoprim without your doctor's advice. If you have a burning sensation, drink lots of warm water and coconut water, but show it to your doctor first.