I do agree that it could very well be just a UTI, which can be treated with antibiotics (make sure that you're also giving him probiotics since antibiotics tend to wreak havoc on their digestive system). I also heard that sometimes infections can stick around for quite some time, so maybe more time of the antibiotic or switching it up could do the trick!
Even in the worst case scenario where he does have some stones, an operation or PTS are not the only options, as I've learned today.
A few weeks ago my 1.5 year old boar Mose had blood in his urine. I immediately took him to the vet and unfortunately, there was a stone in his bladder (mind you, not like a massive one, but one nonetheless). The vet I first met with recommended one of two things, an operation (which would be 2000CAD/1200 pounds - I'm in Canada) or PTS, both options I wasn't fond of. For me, the operation, set aside the price, isn't ideal. Those operations are traumatic, invasive and extremely stressful on the little guys, plus even if you do get it, stones may come back, putting them under anesthesia is extremely risky (even more so compared to dogs, cats, rabbits or even rats) or worst, the recovery can be unsuccessful, inflicting even further pain. I was personally really torn since I obviously want him to live, but I'm also concerned that these operations are extremely scary for them, and furthermore the recovery can be unsuccessful and inflict even more pain. You do come across some posts on the forum and elsewhere of unsuccessful, brutal recoveries, where owners wished they hadn't gone through with the procedure to start with and other posts that four days after the operation they're back to normal, like nothing happened.
All in all, I took him home that day with a heavy heart, some Baytril and some painkillers. The days following the visit and the first few doses of medication, he wasn't looking too good, his poops were funky so I gave him some probiotics (in the form of poop soup - gross but trust me, a game changer!), he lost some weight, wasn't eating, drinking (which is also a known side effect of Baytril) so I was preparing for the worst. But over the next days, he came back to his normal self and now he seems perfectly normal, eats, poops, pees (no visible blood - I obsessively watch it like some crazy lunatic) which, although delighted, I was a little conflicted of making a decision of proceeding with the operation or not.
Seeking a second opinion, I took him to a second vet today, who specializes in exotic small mammals, and her outlook was "don't rock the boat unless you have to". Mose currently is feeling good, his weight is good, he eats, drinks, he's not in pain (partly thanks to painkillers), he can move around perfectly, his tummy/bladder and vitals feels good (according to the vet), his bladder and tummy are not uncomfortable upon palpation, his urine is clear and doesn't show any signs of struggle while peeing/pooping. She recommended that we continue the course of antibiotics and try and reduce the dose of painkillers, and not perform a surgery right now until it's absolutely necessary. Although, not acting upon it doesn't come without risks, where the stone could get lodged in the urethra and cause a fatal and serious blockage, which would have to be treated immediately. She did also mention that the stone wasn't big enough to call for drastic measures, but it wasn't that small that it should be ignored. She then sent me on my way with another dose of Baytril, some more painkillers, and an appointment in 2-3 months to do some x-rays and take another look at how he's progressed. In the meantime, I'll be continuing to feed him low-calcium veg diet, lots of hay, very to no pellets, and filtered water. I will have to monitor him closely from now on, to make sure that his behavior is normal, he continues to urinate and isn't in pain. Morale of the story, operations are not a walk in the park and might not always be the best option for our little guys, especially if inaction is an alternative (mind you it's a risk to do nothing, just like it's a risk to go forward with the operation, and either have the piggy pass away on the table, never recover, or have stones come back shortly after the operation, at which point you start to ask yourself if it's fair to put him through the trauma once more).
You do hear some stories of guinea pigs living with stones and are perfectly happy. Yes, it does take some work, such as making sure that the bedding is as spotless as possible - I have fleece and I clean it up three times a day, switching out the fleece twice a week and the pee-pads as frequently as necessary - , monitor him a little more closely than usual (which for me happens to not be too bad since I can work from home), watching out for calcium in everything you give to him/her. Maybe other vets and/or individual will be of different opinion, although I would ultimately recommend that you seek advice from an experienced vet, and he/she can inform on what the next steps should be.
But ultimately - Hopefully it's not stones in your case!