When you need a treatment, the physician makes a recommendation, or several recommendations from which you might choose.
When you need a treatment but are unable to understand and decide for yourself because you are too young, or you are unconscious, or you are mentally incapable of understanding the choices being offered due to a temporary or permanent disability such as dementia or psychosis, then someone must make the decision on your behalf based on what that person thinks that you would decide for yourself if you were able to do so. That person might be a family member or it might be a court-appointed guardian. Some people draw up legal documents in advance (called advance directives) and some people decide, in advance, who they want to have make health care decisions if they can't make these decisions themselves. This is called having a durable power of attorney (POA) for health care. Some states have laws that specify which family member has the power to make decisions if the person doesn't have a durable power of attorney for health care and is incapacitated. For example, a spouse might be ranked first, if there is no spouse, then an adult child, then a parent, then a adult sibling, a cousin, and so forth.
Now, with this information, if you are the doctor and your patient is incapable of understanding and communicating a decision and you have a course of treatment in mind, whose consent do you need to go forward with your plan? Can that person refuse to give consent?