Forty percent of doctors agree obese patients should be refused joint surgery if resources are limited, a survey suggests.
Being obese can affect the chance of a successful operation
The same proportion felt smokers and drinkers could be barred from certain procedures, the British Medical Association's magazine BMA News found.
The 225 doctors polled said the NHS realistically could not treat everyone.
But they said treatment could be denied only for clinical reasons, rather than because of cost.
The vast majority - 96% - said they would welcome an open debate on rationing in the NHS in order to clear up confusion about the subject.
Last year the National Institute for Health and Clinical Excellence (NICE), said patients' lifestyles could be taken into account when considering if a treatment would be effective.
It said discrimination against patients with conditions that are, or may be, self-inflicted should be avoided when guidance is being drawn up for the NHS.
But its report said that if self-inflicted factors meant that drugs or treatment would be less clinically and cost-effective, this may need to be considered when producing advice for the NHS.
'We all err'
In November, three Suffolk primary care trusts ruled patients with a body mass index (BMI) over 30 - which is classed as being obese - would not get operations like hip and knee replacements.
Doctors in the BMA News survey expressed broad support for the decision.
Dr Simon Ruffle, a GP in Reading, added: "I think that it may be clinically justified, in some cases, not to perform joint replacements and certain procedures but it is not justifiable to withhold them from some and not others on cost grounds."
The survey also found that 39% of those surveyed felt smokers and drinkers should be excluded from certain procedures.
Abergavenny GP Dr Elizabeth Evans said: "If the effectiveness of the procedure is directly compromised by the patient's actions, such as liver transplants for people who cannot abstain from drinking, then a policy of excluding such patients is justifiable."
A BMA spokeswoman said a blanket ban on giving a treatment to certain groups of people, such as smokers or those who are obese, would be "wholly unacceptable".
She added: "The judgement should always be 'does this person need treatment?' and 'will treatment be of benefit?' Every case should be considered on an individual basis."
And Dr David Haslam, chair of the National Obesity Forum, said: "It always has to be a clinical decision and not a financial one.
"There will certainly be occasions where, because of obesity's link to complications, an operation will not be appropriate."
A Department of Health spokesman said: "Treatment should be decided by doctors based on the clinical needs of the patients - not their lifestyle choices."