Thanks for the query.
Urinary tract infection
can lead to red blood cells in the urine. But frank blood is somewhat rare in UTI.
So this can be possibly form vaginal opening only.
Better to consult gynecologist once and get physical examination and speculum examination.
Though comparatively the risk factors for cervical malignancy are less in your case, better to rule out.