Yes. It is entirely possible to be pregnant and simultaneously have an STD. Having an STD while pregnant can cause serious harm to both you and your baby. If you have recently had unprotected sex or some sort of birth control mishap, you should strongly consider getting tested.