A majority of doctors support measures to deny treatment to smokers and the obese, according to a survey that has sparked a row over the NHS's growing use of "lifestyle rationing".

Some 54% of doctors who took part said the NHS should have the right to withhold non-emergency treatment from patients who do not lose weight or stop smoking. Some medics believe unhealthy behaviour can make procedures less likely to work, and that the service is not obliged to devote scarce resources to them.

However, senior doctors and patient groups have voiced alarm at what they call "blackmailing" of the sick, and denial of their human rights.

Doctors.net.uk, a professional networking site, found that 593 (54%) of the 1,096 doctors who took part in the self-selecting survey answered yes when asked: "Should the NHS be allowed to refuse non-emergency treatments to patients unless they lose weight or stop smoking?"

One doctor said that denying in-vitro fertilisation to childless women who smoked was justified because it was only half as successful for them. Another said the NHS was right to expect an obese patient or alcoholic to change their behaviour before they underwent liver transplant surgery.

Dr Tim Ringrose, Doctors.net.uk's chief executive, said the findings represented a significant shift in doctors' thinking brought on by the NHS in England's need to save £20bn by 2015. "This might appear to be only a slim majority of doctors in favour of limiting treatment to some patients who fail to look after themselves, but it represents a tectonic shift for a profession that has always sought to provide free healthcare from the cradle to the grave," he said.

Smokers and obese people are already being denied operations such as IVF, breast reconstructions and a new hip or knee in some parts of England. The medical magazine Pulse last month found that 25 of 91 primary care trusts (PCTs) had introduced treatment bans for those groups since April 2011.

Bedfordshire PCT, for example, decided to withhold hip and knee surgery from obese patients until they had slimmed down by 10% or had a body mass index of under 35. Similarly, North Essex PCT obliged obese people to lose 5% of their bodyweight and keep the pounds shed for at least six months before receiving treatment.

But Dr Clare Gerada, chair of the Royal College of General Practitioners, said the survey findings and trend towards "lifestyle rationing" was "very disturbing".

She said: "It's the deserving and undeserving sick idea. The NHS should deliver care according to need. There was no medical justification for such restrictions on smokers, as giving up nicotine would not necessarily enhance an operation's chances of success. Clearly, giving up smoking is a good thing. But blackmailing people by telling them that they have to give up isn't what doctors should be doing."

Doctors should not back such bans unless there was "overwhelming evidence" that stopping smoking reduces the patient's risk of suffering complications or dying, she said.

But obesity could merit such bans, Gerada said. "Obesity is a different matter. Operating on a very fat person is more dangerous. Anaesthetically it's harder, the surgery is harder and the rehabilitation takes longer. So it's medically legitimate to withhold treatment from some very overweight people. But it should not be done for social reasons," she said.

Tam Fry, spokesman for the National Obesity Forum, said doctors who back bans "are totally out of order. There's no way that someone who is obese can be denied initial treatment by the NHS – that would be totally unjustified. There are many reasons why people are fat and gluttony is only one of them. The NHS should not be discriminating against fat people purely on the grounds of their fatness. That would be a denial of their basic human rights."

The Royal College of Physicians, which represents hospital doctors, said it opposed the practice. "Lifestyle rationing is creeping into the NHS. There are reported examples where treatments have been restricted by PCTs and we wouldn't agree with that," said Professor John Saunders, chair of the college's ethics committees.

But he defended doctors' right to examine whether a patient's lifestyle might reduce the chances of a treatment succeeding. "Some lifestyles will impact on the success of treatments; for example, if someone weighs 150kg, that may have an impact on the outcome.

"Lifestyles contribute to risk and sometimes they may make treatments too risky to undertake. But that's quite different to saying, 'I'm not going to give you surgery because you smoke or are overweight'," said Saunders.

The Department of Health took a similar stance. "There is no excuse to deny care on the basis of arbitrary blanket bans — the individual needs of patients must be taken into account," said a spokeswoman.

"But there can be clinical reasons to ask someone to take action such as losing weight or stop smoking before surgery because the risk of surgery can become greater."

Dr Mark Porter, chairman of the British Medical Association's consultants committee, blasted treatment bans as "wholly unacceptable". But he added: "There are occasions where a doctor may advise an obese person to lose weight before surgery can safely go ahead. This is a clinical rather than a rationing decision."

Dr Ringrose said: "Perhaps its time for the NHS to have a realistic discussion with UK taxpayers about what treatments it can continue to cover."