Prenatal heartburn is very, very common. As the baby grows, it presses on your stomach and your stomach doesn't have a lot of space. So, a lot of the acid in your stomach starts to get pressed up the esophagus and you can start to have prenatal heartburn.
It's fairly easy to avoid exercises that will exacerbate it. You just want to make sure that you don't ever have your stomach over your heart. So, no flipping upside down. If you are doing prenatal yoga, try to avoid down dog and standing forward folds. You also want to avoid poses like lying on your back with your legs up the wall if your butt is on a bolster.
You want to avoid the heartburn, you just want to pick exercises where you are standing fairly upright, or lying on a gentle incline. So, if you are doing your yoga practice, you can still do most of the standing series, warriors and lunges.
If you are working out in the gym, you can keep going with your lunges and even do some incline chest-press. All of that will not exacerbate the heartburn. And while I am not a fan of antacids, if you are experiencing this, talk to your doctor, and you doctor may be able to recommend some things to help you out.