Of course you can as long as it is in her normal exercise routine. I have always heard that you can continue doing anything you normally did with them when they are pregnant, but not to introduce anything new like don't start barrel racing or anything strenous if the mare is not use to it. I would stop riding her about a month from her due date but continue to walk her in hand so she gets some exercise.
Yes, it is totally acceptable to ride most horses and ponies during pregnancy. As already stated. Do not start anything new or strenous. But if the pony is used to the exercise it is totally acceptable. They could also sit on the pony in the last few months and do some gentle hacking or walking in hand.
I continued to ride my mare up until the day before she gave birth. The last month was just a few min. Bareback in the round pen. Nothing strenuous just walking around for about 10 min. I knew I wouldn't be able to ride her for a month or so after birth so wanted to go as long as I could before the baby was born.