UTI & Masturbation

Dejiah
Okay ladies, I'm worried. I've had a UTI for about a week now. (i do have antibiotics) but I was wondering if it's okay to masturbate? My period is a few days away and my "parts" are screaming to be played with. So can I do it? Is it safe?