Round worms typically take about 2 months or so from the time egg(s) are ingested. If you are good with personal hygiene before eating, cook your meat and wash your fruits/vegetables you probably don't have worms at all. There are many possibilities for your symptoms. The "worm-like" thing you saw could have been some food that was not digested well, which may go along with your other symptoms. Here's a link to the lifecycle of the human roundworm from the CDC.
The more likely possibility is that your symptoms are from the urinary tract infection, and antibiotic you are taking. A UTI can cause quite a bit of abdominal discomfort, and antibiotics commonly cause gastrointestinal complaints of all sorts (nausea, gas, bloating, pain, cramping, diarrhea, even vomiting).
Just in case it's the antibiotic, you can eat some yogurt daily (make sure it has live/active cultures). Then, follow-up with your doctor when you are finished with the antibiotic to make sure the UTI is cleared. If you are still having symptoms, report these to your doctor so some testing can be done to determine what the problem is.
Other problems with the GI tract (such as you mentioned above) can cause problems with digesting food---so you may see odd things in your stools because of it.