Within England, free NHS hospital treatment is provided on the basis of someone being ‘ordinarily resident’. Being ordinarily resident is not dependent upon nationality, payment of UK taxes, National Insurance contributions, being registered with a GP, having an NHS number, or owning property in the UK.
Those who are not ordinarily resident in the UK, including former UK residents, are overseas visitors and may be charged for NHS services.
Treatment in A&E departments and at GP surgeries remains free for all. There are exemptions please read the full guidance here from NHS England.