The pain that you are feeling in the left side under your rib cage has nothing to do with you menstruating.
As you did do exercises that you have not done before, the pain that you are experiencing in the rib cage and your shoulder could be from that.
Pain in the left side of your ribcage can also be from stomach problems (as well as the spleen). It is highly unlikely to be a spleen problem unless you were punched or drink excess amounts of alcohol. The appendix is in the groin area on the right side of your body.
Have you eaten anything that may have upset your stomach, like very spiced and fatty foods? If so, this may be the cause of the pain in the rib cage This should settle soon. If you feel this could be the stomach and it is very uncomfortable, you can take an antacid to see if it helps settle it.
For the shoulder pain, you can apply either a cold or heat pack and a massage in that area may help to relieve any muscular spasms.
You can take pain relief as directed on the packet to help ease the pain.
Having left shoulder pain can be a warning of a heart problem, hence an investigation by a medical professional is advised.
Let me know how you get on.
It's possible you could have pulled/strained a muscle doing yoga, but without further evaluation, you should be seen by a doctor due the location of your pain. Age has nothing to do with it. It is better to be safe than not.
It doesn't seem like it is linked to the heart. I am young and healthy and just went to a yoga class yesterday with no problems. It feels like the pain is below the rib case.
This should have nothing to do with your period. You need to go to the ER now since this could be related to your heart. Do not wait...go now by ambulance.