Surgeons, dentists, midwives and other healthcare workers who have HIV are to be allowed to perform all kinds of procedures on patients, following the lifting of an outdated ban that led in some cases to the loss of careers and livelihoods.

It is more likely that somebody will be struck by lightning than be infected with HIV by their doctor or dentist, said chief medical officer Dame Sally Davies as she announced the change of policy.

HIV levels in the blood of those on modern combination drug therapy are too low for the virus to be transmissible. There are only four known examples of a healthcare worker infecting a patient, none of them in the UK, and in every case, the doctor or dentist was not on drug treatment.

Attitudes in society need to change, said Davies, and we have moved on from the 1980s when Aids was always lethal and the infamous government advertising campaign warned the population about the dangers of the disease. "I remember as a young doctor seeing the reports and I think a lot of that is what has stuck in the public memory," she said.

Today we should no longer be talking about people who are "HIV infected" and under "a death sentence", she said. People on drug treatment can now live as long as anybody else, with as good a quality of life and the certainty that they will not infect their partners, she said. "I worry that the public has not caught up with the reality of HIV treatment. The issue is – are people who are infected infective or not, rather than are they infected or not."

Restrictions were imposed on doctors, nurses and dentists with HIV in 1993. Anyone with HIV was banned from carrying out treatments or surgery inside a patient's body where their fingertips or hands were at any point not visible - because they would not be able to see if they had cut themselves and were bleeding. The ban meant some surgeons had to change their practice, but dentists invariably had to give up their careers.

Allan Reid became one of them after he was HIV diagnosed in 2007. Knowing back then that medical treatment prevented the virus being transmitted to patients by medical staff with HIV, he was reluctant to give up dentistry, but somebody he had told in confidence sold the story to the Sun newspaper. He lost his career and then his home. "I couldn't pay my mortgage. I'd recently bought a home and spent a fortune doing it up. It was for my retirement," he said. He could not get a job because he had to explain why he was no longer a dentist – and the stigma of HIV ensured that he was turned down by employers.

He had a small amount of savings and the support of friends who were outraged by what had happened. With their help, he went on to study public health and is now a specialist registrar in Birmingham.

Having to leave dentistry was far worse than the diagnosis, he said. "It really defines you as a person – it is who you are – you are Allan the dentist. Dealing with the loss of that was [like] a real bereavement."

Reid campaigned for an end to restrictions surrounding HIV and healthcare. In 2005, two years before his condition was diagnosed, there had been a review, he said. It was known that treatment prevented transmission even then, but no change in the policy was made. "I just hope the Department of Health will give support to healthcare workers who have lost their livelihoods as a result," he said. Those who want to should now be able to retrain and return.

The UK is now catching up with the rest of the world. Only four countries still impose restrictions on healthcare workers with HIV. A working group formed in 2007 to consider changing the rules for the UK and advised the government in 2011 that it should be done, but changes will not come into effect until next year.

"I think there is still a lot of fear around HIV and a lot of misunderstanding about HIV," said Deborah Jack of the National Aids Trust, who was a member of the advisory group. "This announcement is based on good scientific evidence, but I think there will still be unnecessary anxiety amongst people."

She said she hoped the policy change would be an opportunity to educate two groups of people – those who were afraid of HIV because of what they learned in the 1980s and the younger generation who knew little about it.

Healthcare workers with HIV will face no restrictions but must be on a register and monitored every three months by doctors to ensure they are on the correct treatment and that their viral load is undetectable. There may now be about 110 healthcare workers with HIV working in the NHS, said Davies, but it is possible others may not have been tested because they realise the dire implications for their career. Lifting the restrictions will enable those people to be tested and treated, which will mean that they no longer pose any sort of risk to patients.

Davies also announced the lifting of a second ban, on the sale of HIV self-testing kits in the UK. It is hoped that this will encourage more people to find out their HIV status. It is estimated that 100,000 people in the UK are infected with HIV, but a quarter do not know that they are carrying the virus. Unless they are tested and treated, they can transmit it to others.