Performing a pelvic exam without consent on an anesthetized woman, even for teaching purposes, is unethical and considered sexual battery in some jurisdictions.
Research ethics should be included in the medical school curriculum so students and residents can fully understand the ethical implications of medical research.