In the United States, you need a prescription to obtain antibiotics that can treat a UTI. You can take over-the-counter drugs such as paracetamol to treat the symptoms the condition causes, such as pain, but these will not treat the underlying infection.