Male cyclist having more UTI or becoming sterile is an urban legend. But you might need antibiotics for other reasons and you can indeed get UTI (but not because you are cycling). Any doctor will tell you that you should not take medecine without consulting. I do carry antibiotics but this is because I have a medical background and it saves me (or my wife) some visits to the doctor.
But it really depends where you're going. In developing countries, there is no need to carry antibiotics because you can get anything over the counter for pennies. In developing countries you will need a prescription, so you will need to see a doctor anyway. The only places I would carry some is if i plan a trip in extremely remote area where medication and doctors might be days away. Since you probably won't know what you're getting when you get sick, you should carry antibiotics with a large spectrum (meaning it kills a wide variety of bacteria), such as amoxicilline (with acid clavunavic if ou want something stronger).
Depending what you have you can use between 1.5g up to 2g a day (3g for gonorhea) divided in 2 to 3 doses. But again, it is always better to go see a doctor if you can. Keep in mind that medecine have a peremption date and that having your pills sitting in your pannier exposed to the sun during the whole day, plus the hunmidity trapped in the pannier, is not the best way to store medecine. A few weeks like this and you could end up with totally ineffective medecine.