If you can catch a urine sample, that is the best way. I used a the top of a butter container. I taped it to a stick and slid it under her when she squatted. Worked better then I thought lol.
If it is a uti, then it is treated with antibiotics. The bigger issue is getting it cleared up. Sometimes they can be stubbern. after the antibiotics, catch another sample and have it tested. good luck