Hi with my first I had bad pain in right side under my rib it turned out I had tore a muscle, if it dosnt go with some rest and maybe some pain medication after day or two would just go have checked out. Hope you get it sorted.
Oh my gosh! You sound just like me! I experienced this about two weeks ago, around 21 weeks. I got myself into a panic about gallbladder problems and the pain persisted for DAY! Turns out it was more of a skeletal issue, made worse by unrecognized heart burn. I took it easy for a few days, had a couple Tylenol during that time, and was careful to sleep with a pillow that offered good support to my neck. Tums also made a huge difference.
Try some of those things first to see if this could be your problem too. If it continues, talk to your doctor about it! But don't make yourself freak out like I did! No more Dr. Google!