There's nothing inherently unethical about treating a friend or family member. However, the AMA recommends against it for other reasons:
When the patient is an immediate family member, the physician’s
personal feelings may unduly influence his or her professional medical
judgment. Or the physician may fail to probe sensitive areas when
taking the medical ...