Do you have a sister?! I'm guessing not. I don't have siblings, but if I had a sister (and assuming we got on and were close), she would be my MOH. My sister would come before my best friend. That's nothing against my friend, but generally most people would prioritise family.
I understand you had an agreement. However, when was this agreement made, years and years ago, when you were teenagers? Before you both had partners? More recently?
It may be that your friend genuinely agreed with you at the time the agreement was made. It may be that she forgot about the agreement (especially if it was made a long time ago) or simply changed her mind.
You are pregnant, and it may be because you're pregnant she changed her mind. She may have thought that you would appreciate an easier 'turn up on the day' type role, than have to plan and have a more active role. Perhaps she thought she was being considerate???
You are still going to be a bridesmaid, so your friend hasn't forgotten you. You are clearly an important person in her life, otherwise she wouldn't have asked.