Some would say that an unbaptized child won't enter heaven. I have a problem believing that. And if a mother chooses to risk or give up her own life to allow her child to have a life, she has made the supreme sacrifice. Therefore, she may have paid the price for her sins and be immediately welcomed by God if she dies.
However it goes, it is a harrowing situation to face and fortunately most of us are spared this decision.
There is a 1963 movie called The Cardinal which deals with this very subject. I watched it years ago and I think I will try to find it and see it again.
Only Jesus Christ can pay the price for anyone's sins -- not one of us is able to redeem him/herself. All we have to do is accept His free gift of grace.