I am 24+5 and have had the same rib pain on & off for the past week or so. I asked my midwife about it and she said it is probably the baby led in a certain position, or it is just your body stretching to accommodate your growing baby!
Hi, Is the pain around the level that your bra sits? This might be a long shot, but I had a similar problem and the midwife said it was a 'brûler d'estomac'. I live in france and I suppose the translation would be heart burn or acid indigestion (I'm not totally sure). She prescribed me Omeprazole and it was a huge relief. It might be worth asking about next time you see your midwife/GP? Good luck
24w is probably too early for it to be baby pushing up, but your rib cage will be expanding as your baby grows and that's probably what it is. I've had it for a couple of weeks now and it's a real killer. I just can't get comfortable unless I'm sitting bolt upright!