I heard a loud crack, or pop from my ribs and now it hurts to breathe or cough. Should I go to the er?

Pleurisy. I would if the pain persists or if you develop shortness of breath just to be sure you do not have a spontaneous pneumothorax.
Chostrochonditis? Just distal 2 the red area is a joint where the rib ends & the cartilage bgins. These could cause the pop due 2 a stress injury & resultant pain is from the inflammatory response. Check with a pulmonary specialist or chest surgeon 4 eval & care. Usually respond 2 ice, nsaids, activity modification. Also a rib support.