You definitely need to see a doctor about this. This kind of pain can be caused by muscle strains; sometimes the muscles inside the ribs that allow them to flex when you breathe can go into painful spasms. Anti-inflammatories may be able to help a bit and, if it is a muscle strain then muscle relaxants may as well but you're need a doctor to get a prescription. Good luck!
Important:
We hope you find this general health information helpful. Please note however, that this Q&A is meant to support not replace the professional medical advice you receive from your doctor. No information in the Answers above is intended to diagnose or treat any condition. The views expressed in the Answers above belong to the individuals who posted them and do not necessarily reflect the views of Remedy Health Media. Remedy Health Media does not review or edit content posted by our community members, but reserves the right to remove any material it deems inappropriate.