Does a pregnant lady have to stand up for an old man or talmud chacham if it is difficult for her to get up?
An ill person need not stand up for a Talmid Chacham (Shulchan Aruch, Yoreh De’ah 376:1). Shvus Yaakov (1:26) explains that this is because the mitzvah is to stand in a way that indicates respect for the Talmid Chacham, which is not self-evident when an ill person stands.
See also Bereishis 21:35, where Rachel apologizes for not rising when her father Lavan came into her tent, explaining that “Derech nashim li,” which the Ramban suggests might mean that she was ill and thus had difficulty in standing. This implies that this would be sufficient reason to permit one not to stand.
A pregnant woman presumably fits in to this category as well. However, as with an ill person, she may stand if she wishes.