Can an STI Affect Birth Control?

Alice-Marie
I was wondering if having an STI can mess up my birth control. I take the pill and I was having problems with spotting and irregular bleeding. I took a two pregnancy tests and they both came back negative, because I read that irregular bleeding can sometimes be caused by pregnancy. But I just thought that maybe an STI could have caused the irregular bleeding. 
I have only had sex with one person this year, but we never used condoms. But maybe one of us could have contracted it before we got together. 
I am going to make a doctor's appointment but I thought I would ask the community here as well, to hopefully ease my mind. 
Also, does anyone know how long you can have chlimydia without knowing? My friend just got a call from Planned Parenthood and she is freaking that she got it from her boyfriend (which means he is sleeping around). It she could have contracted it from someone she slept with before her boyfriend but that would have been at least five months ago.