The system to ensure that illegal immigrants in Britain do not receive free NHS care is unworkable
The government says failed asylum seekers or others without permission to be in the UK should only get limited free care, including emergency aid.
But GPs and primary care trusts said there was no way of ensuring illegal immigrants did not get free care.
David Lock, of law firm Mills and Reeve, which is advising some of the trusts, said the system was in a mess.
Mr Lock, a former Labour MP, said his firm represented scores of NHS primary care trusts and he was frequently being asked for advice.
He said he was telling them to carry on treating illegal immigrants who were already on GP lists as there was no practical way of removing them from the NHS register.
"The system is a complete mess. There is conflicting advice out there and NHS trusts do not know where they stand.
"If it is the case that illegal immigrants should not be getting free care, how is that to be enforced?
"It is a very complex situation, but the government needs to clarify its position. Trusts are quite rightly considering what their obligations are at a time when there are financial pressures in the NHS."
There are estimated to be about 400,000 illegal immigrants in the country.
Asylum-seekers are entitled to NHS care while their application is being processed.
But, if their claim is rejected, the government says they should not get the care free.
The same rules apply for people who have overstayed their visa or entered the country illegally.
There are a few exemptions for both GPs and hospitals relating to emergency care and immediate necessary care - to stop a condition becoming life-threatening.
Treatment for communicable disease such as TB can also be carried out free because of the potential impact on public health. On-going treatment is also often exempt.
'We are not here to police the system'
NHS and schools 'at risk from surge in EU immigration'