Hi there!
Lower
back pain could be from a number of reasons and like you rightly said could also be due to a pulled muscle. but usually uncomplicated UTI doesn't cause lower back pain - lower back or flank (side of the waist) pain in UTI can happen if the kidneys have swollen either due to Collection of pus there known as
Pyelonephritis or there is something obstructing the flow of urine causing it to remain in the kidneys or the pelvis/beginning of
ureter of the kidneys known as Hydroureteronephrosis. You could also be having a stone in the ureter or kidneys which could also cause similar pain especially if it moves. Stone there can also cause the above 2 conditions i said earlier.
Now to differentiate as to what is the likely pain, you could try this(not foolproof, but works) - pain due to a muscle pull or stretch is likely to be more on certain positions and postures only - it comes down when the muscle relaxes. Whereas pain due to any of the other causes i told above is most likely to remain regardless of the posture or the position and usually is very severe, associated with
vomiting and
fever also if there is an infection..
I suggest if you feel it is due to a Kidney problem then a Urine routines and an
Ultrasound of the Kidney Ureter and Bladder will help.
as to the pain killer - if there is a preexisting kidney disease then it is not advisable to take NSAIDs without supervision. Sometimes if it us due to a stone, the regular pain killers will not be effective.
So ideally you should visit a hospital.
Hopefully this helps.
Thanks!