Hospitals have wrongly told some migrants needing urgent care to pay for it in advance even though they qualified for free treatment on the NHS, the government has admitted for the first time.

Rules were broken when 22 people were ordered to pay before they could start treatment, despite the seriousness of their condition, the Department of Health and Social Care (DHSC) has acknowledged. Three of the 22 were women who were prevented from having an abortion.

A minister in the department has admitted that the 22 were wrongly told they had to pay upfront after hospital personnel made mistakes in their interpretation of a controversial rule that has led to migrants being denied care for cancer, heart complaints and other serious medical conditions.

The admission is a blow to the government’s controversial decision to force hospitals in England to demand the cost of treatment upfront from people deemed ineligible for free care.

Data published by the Guardian under the Freedom of Information Act in November 2018 showed that across 84 of England’s 148 acute hospital trusts, 2,279 patients were charged upfront between October 2017 and June 2018.

Under the charging regulations those in need of “immediately necessary and/or urgent” NHS care should receive it without having to pay in advance, regardless of their immigration status. But campaigners, including doctors’ groups and health charities, claim the rule is often being misapplied and is leading directly to migrants who cannot afford to pay the charges missing out on treatment.

The errors came to light during a recent government review into the operation of advance charges, which ministers ordered NHS hospitals in England to start implementing from October 2017 as part of the government’s “hostile environment” approach to immigration. Labour and the Liberal Democrats want the rules scrapped, while several medical royal colleges, the British Medical Association and the Equality and Human Rights Commission have all voiced deep unease about the policy.

In a recent parliamentary answer Zahida Manzoor, a Conservative peer, said the review had identified “22 case studies [which] included instances where individuals were required to make advance payment for treatment that the department has concluded was arguably, on proper analysis, immediately necessary and/or urgent”.

Lady Manzoor did not say if any of the 22 did hand over money in order to get their treatment, how seriously unwell those involved were or what medical conditions they had.

But a 113-page legal document, released by the government during a judicial review last year of the charging regulations, made clear that: “Evidence suggests some cases of poor practice where treatment the department [DHSC] considers to be ‘immediately necessary’ and/or ‘urgent’ is treated as non-urgent.”

It added that the 22 included “three examples concerning pregnant women who have said that they chose not to have an abortion due to a requirement to make advance payment, with the result that they proceeded with the pregnancy”.

Chai Patel, legal policy director of the Joint Council for the Welfare of Immigrants, said the errors showed that upfront charges should be axed.

“The government has now admitted it is aware of multiple cases where people have wrongly been denied urgent or immediately necessary treatment because, as should be glaringly obvious, doctors do not have the time or expertise to monitor immigration status.

“Matt Hancock [the health secretary] must repeal these regulations to avoid wrongful deaths in future. If he does not, then it is he, not the doctors and nurses navigating his red tape while trying to make life-or-death decisions, who should be held accountable.”

Anna Miller, the policy and advocacy manager at Doctors of the World, said: “These 22 cases are just the tip of the iceberg. They make it clear that hospitals are struggling to implement this inhumane and impossible policy, which turns NHS charging into an issue of life and death.”

Before October 2017 people deemed ineligible for free NHS care were treated and then billed afterwards. When upfront charging came in, “the requirement to always provide urgent care was the safeguard to ensure people did not die or suffer serious harm. These 22 cases are a clear indication that this safeguard is not working and should be stopped,” Miller added.