If a patient refuses medical treatment medical professionals can not force the patient to accept the medical treatment or give them the medical treatment without their consent even if the patient has a severe, life threatening condition. It is a personal choice of the individual as to whether they want to receive medical treatment. All medical professionals can do is encourage the patient to consent to the treatment.
With modern medicine being so able to save lives at any cost, it is not always ethical to keep people alive. If it is an extremely advanced case, and especially if the patient requests it, it is ethical to withhold treatment and not spend time and money making the patient uncomfortable just to prolong life.
Yes, it's entirely ethical. There comes a point with medical treatment where both the patient and the medical professional eventually realize it's hopeless. Usually the patient realizes this long before the medical professional does. There's only so much you can do, and suffering through the pain and agony of yet another operation just stops being an option.
If the patient wants to not treat themselves, then its all up to them. If its a child, well that's a different story. The person who wants to die, is a grown adult, let them go. If its a child and an adult is holding back care, they need to step in.