In Mashcehes Brachos (Bavli) 60 the Gemara states that one should not pray that his unborn baby be a boy if it's after the time the baby has formed already in the womb. However, in Masheches Brachos in the Yerushalmi perek 9:halacha 3 the Gemara brings the opinion of Rabbi Yehuda ben Pazi who holds one can daven for the baby to be a certain gender even while the mother is sitting on the birthing stool.
My question is that in Bavli the Gemara (Mishna) brings a case of a person who hears there is an outcry of anguish in their town and davens that its not coming from his family, the Mishna holds this is a prayer in vain. However, the Yerushalmi does not bring this case, so would Rabbi Yehuda ben Pazi allow one to pray in this case as well, or is an unborn baby the only unique case in which one can pray for a change in nature?