Can you still practice yoga with an injury? Well, that depends. What did your doctor/physiotherapist say? Please consult with your specialist and when joining for a class please let your teacher know on arrival so that we can discuss any possible modifications for class.
Can you practice yoga while (post) pregnant? Well, that depends. What did your obstetrician say? While more obstetricians recommend yoga during pregnancy (which is great!) as a general rule of thumb it is not recommended to start anything brand new during pregnancy. If you already have a steady and strong practice you could likely enjoy your practice throughout your pregnancy, if you've never done yoga starting a hot power yoga practice might not be the best time. Please let your teacher know if you desire any possible modifications. After your pregnancy in general you can slowly start to build up, but listening to your body and consulting a specialist or a doctor if you have doubts are the best way to go.