Performing a pelvic exam without consent on an anesthetized woman, even for teaching purposes, is unethical and considered sexual battery in some jurisdictions.
Residents and attending physicians have an ethical responsibility to speak up if there is a concern that a colleague lacks clinical skills and is providing inadequate patient care.