It's almost assuredly just an infection, likely bladder infection; bladder cancer is pretty rare. You may need a workup by a urologist to determine if you have kidney/bladder stones contributing to the infection, as urinary tract infections (utis) in men are not nearly as common as for women, and often related to stone formation. Stones also have a similar presentation to infection/cancer--blood in the urine, pain with urinating, frequency, etc. However, if you are cured with the antibiotic, save yourself the time, but strongly consider it if the problem recurs. The antibiotic was probably a fluoroquinolone--broad spectrum against all the common bugs that cause utis.