You can be pregnant and have an STD simultaneously. In fact, having an untreated STD while pregnant can cause serious harm to you and your pregnancy. If you’ve had unprotected sex with a high-risk sexual partner, or if you have shared needles, it’s important that you get tested immediately.