Cats do not tolerate any human medication very well. There is far too great a chance for toxicity, allergic reaction and organ damage to take any risks.
How long has this been going on with your cat? Is he neutered? How are his litter habits? Have you seen him make urine and stool normally?
What a good heart you have! So many of these abandoned cats end up suffering a terrible life and death if not for people like you
I'm wondering if he might have an infection that's causing these symptoms. It is not at all unusual for people to think it's a limb injury when in fact it's an intestinal parasite or even FLUTD (feline lower urinary tract disease).
Check his gums and let me know if they're a normal color.
And if you can get a better look at his back end, let me know if you notice redness or swelling, anything unusual in those areas.
Neutered males may still spray, especially if they were neutered after reaching sexual maturity and having picked up the behavior already. This poor guy is probably determined to keep his hearth and home no matter what - and is spraying to be sure no other fellows vie for your attention.
Urinary problems usually present with squatting to urinate and straining instead; or signs of red/pink in the urine; or no urine coming out at all. There would be symptoms of pain upon touch in many cases, sometimes bloating, even problems with feces, which you're describing.
All that said, the other concern I have is that kitty has been injured, maybe kicked by the horse. If there's internal injury, you could very well see the soiling you saw and the pain display.
How is he doing right now? Still alert, bright eyed, eating/drinking?
The problem with antibiotics is that they don't just destroy the bad bacteria, they take out a good number of the good stuff too. When this happens you may find new problems rather than resolution of the original problem.
Also, once a course of antibiotic is begun, it has to be continued for (usually) 10-14 days, even after the initial problem seems to have resolved. Otherwise those 'bad bacteria' just come back, with some immunity to the antibiotic, making it harder to get rid of them the next time around.
All in all, doctors are trying to avoid prescribing antibiotics not only for our animals, but for humans too. They should be saved for "absolutely necessary" situations only.
In this case it would probably be a better idea to just address the pain until you can have him seen. I'd be more comfortable if he had at least an Xray to determine whether or not there's an injury to his spine or legs.
Keep checking his gums for normal color too, and if you see them become pale or any other symptoms you just know are not right - don't waste any time - find an emergency care center. These are usually regular vet offices that keep after hour hours.
Keep him calm, comfortable and warm. Move his litter box closer to him along with his food/water and again - trust your instincts. They've served you well so far.
If you can get him seen by someone tomorrow/Sunday it would be very worth it.
Let me know how he does ok? And how you're doing too.
If you feel 'heat' from the area, you might want to try applying ice or cold packs. If you feel it's muscular (although I understand how difficult it is to know for sure), heat may help relax it.
I don't care for electric sources around animals, but this is up to you too. I use 'rice socks' on our animals (I own an animal rescue org) when they need it.
Use any thick sock, cotton preferred, fill 3/4 with raw white rice and knot the end. Microwave it for 1 to 1 1/2 minutes and then shake it out to distribute the heat and be sure it's not too hot.
This can last for a couple of hours or more if you tuck it under a blanket. You can use two socks just for comfort - cats love the heat.
If you really want to try an aspirin, 1/4 of a "low dose" aspirin may be acceptable; or up to 1/2 of a baby aspirin, but no more than once every 24 hours and never more than two days in a row without veterinary monitoring.
Remember, aspirin is a blood thinner and if there's injury internally, it could make things much worse.
Watch for drooling, vomiting, lethargy, staggering, rapid heart rate, hyperactivity or anything else you know isn't 'right' for the first few hours.
This is a very lucky cat.