When a cat repeatedly visits the litter box, like 5 times in 10 minutes, or begins to pee outside the litter box, with even a drop or two of blood, one likely cause is a urinary tract infection.
The likey cause of most UTI's is bacteria spreading from the external opening up into the bladder and then even on to the kidenys. Few infections seem to begin from blood into the kidneys, except in cases of trauma or urinary tract obstruction. 33-50% of all bacteria is E. coli. 25-33% are one of the many strains of Staph or Enterococci. The remaining are a mix of 8+ bacteria. In about 75% of the cases, only one bacteria is responsible for the infection, with 20% of the cases having 2 different species involved. There is also the slim chance that a fungal infection can be the cause.
The standard treatment is antibiotics. The first-line options are amoxicillin are trimethoprim-sulfadiazine. Second-line option is nitrofurantoin. Other antibiotics can be used, but many seem to be resistent to Enterococci. Interestingly, the article says about clavamox "not established where there is any advantage over amoxicillin alone", which is intersting because clavamox is often seen as the go-to antibiotic. Also of interest is the comment on cefovecin (Convenia) "Should only be used in situations where oral treatment is problematic" and it goes on to explain that the long duration interfers then with any post-treatment cultures for over 21 days.
In simple cases, treatment with antibiotics is for 10-14 days, with symptoms lessening in 48 hrs. Sadly, simple UTI's are rare. More complicated cases involving CKD or diabetes should be treated for 4-6 weeks. Reinfection and relapse can occur.
The article also mentions alternative treatments, including cranberry extracts, D-mannose, methenamine hippurate, and probiotics. Sadly there are no feline studies on any of these products. Do note that methenamine is "poorly tolerated by feline patients".
Summarized from "Urinary Tract Infections", Shelly Olin and Joseph W. Bartges, pp 509-517, in Consultations in Feline Internal Medicine, v.7, 2015.