When a pregnant woman is knowingly causing harm to her unborn child, there are various legal interventions that can be taken to protect the rights if the fetus.
Performing a pelvic exam without consent on an anesthetized woman, even for teaching purposes, is unethical and considered sexual battery in some jurisdictions.