Yes. A urinary tract infection can detect severe infections which have the potential to  spread upwards to the kidneys (ascending infection). If infection spreads to the kidneys, (a condition called Pyelonephritis), it becomes difficult to treat, and the duration of treatment also increases. So, timely testing and treatment of UTIs is extremely important.