I have had rib pain in my upper back for 3 days now it hurts to breathe and to lay flat on my back and on my left side. Should I be worried?

No. It is muscle spasm due to wrong posture, bedding or pillows. Try to correct that and wait for 1 week. In meantime do brisk walking for 1 hr. May take some warm shower and NSAIDs. Don't do any bending or stretching until pain goes away.