I know that when I was pregnant i got extremely horrific gas pain up in my ribs that hurt so bad I couldn't breathe and would throw up. They would sometimes be so high up that they would even feel like they were around my heart. It was kind of freaky until I realized what they were. =] Hope this helps.
My advice would be to call your doctor first thing in the morning. Rib pain, especially severe rib pain that doesn't ease with a change of position or that isn't obviously a stitch in your side....can be an indication of something serious.
OR..it could be rib pain. No biggie. So the only way to know will be for your doctor to check a few things out...you need to call your doctor first thing, OK?