Is this possible bactrim (sulfamethoxazole and trimethoprim) allergy if it hurts when I pee it out?

No, U still have. Cystitis or urethritis. Uti symptoms usually improv after acouple of days on the correct antibiotic. You may need to be on a different antibiotic if symptoms persist whilst you are taking bactrim (sulfamethoxazole and trimethoprim). You may need to get a urine culture & sensitivities to identify the optimal antibiotic for you.
Unlikely. Bactrim (sulfamethoxazole and trimethoprim) allergy would more likely show as rash, itching, hives, throat swelling, difficulty breathing (latter are severe & require immediate attention). Painful urination suggests the UTI is not being cured by the bactrim (sulfamethoxazole and trimethoprim). See the prescribing doc for alternate antibiotic (assuming you've given the Bactrim (sulfamethoxazole and trimethoprim) time to work). Urine culture & sensitivity may be needed to determine best antibiotic.