Ampicillin at 6.5 weeks

Olivia
Hi all! This is my first pregnancy and was actually unplanned so I haven't been taking care of myself like I should be until I got that positive test. I was fine for about the first two weeks and then I started feeling pressure when urinating and since my first appointment isn't until the 11th I figured I'd just wait it out. Then on Tuesday I went to the bathroom and felt like I had a uti. Long story short I had a urinalysis done with the midwife at my office and it came back negative but when she sent it for culture they found some bacteria and put me on ampicillin. 
I hate taking any medication for any reason and especially now that I'm pregnant I don't want anything that would hurt the baby. Has anyone taken ampicillin while pregnant? Any advice??