It depends on the STD/STI. Some after treatment will still be with you but dormant. If it is virus based there is only treatment no cure.
Make sure your doctor treating the STD knows you're pregnant as it may impact how they treat you to keep your baby safe. (Most antibiotics can be harmful during pregnancy).