I just entered my second tri, but I've been riding throughout the first tri. I stopped training my friend's OTTB, but still ride my mare regularly. The key is to not take risks (young horses, jumping, eventing, etc...) and keep it to where you are physically comfortable. If you can ride and feel fine, go for it. If you are cramping, listen to your body and just groom for a while.
My doctor told me to stop riding during my second pregnancy because it's "too bouncy". I told her, "If you're bouncing, you're doing something wrong." Lol. She didn't get it, but some of the dressage ladies I know thought that was hilarious.
FTR, my mother rode until the day before my sister was born and my former coach rode all the way up until 38 weeks with all three of her kids.