Yes, sometimes when you cough you can have rib pain and discomfort. I would try a medication called Mucinex to break up the mucus so you can cough it up.