But health service managers do have the power to approve treatment at their own discretion, Lord Justice Ward added.
He called for the process of choosing those patients to be clarified by the government to prevent further confusion.
But health campaigners expressed disappointment at the ruling. ‘This undermines social cohesion, increases avoidable illness and death and contributes to the spread of infectious disease,’ said Deborah Jack, of the National Aids Trust.
The ruling follows a London hospital’s decision last year not to treat a 35-year-old Palestinian man suffering from a liver condition.
He has been billed for £9,000 of treatment, which he cannot pay. It is not clear how the bill will be settled.
He has been told he cannot live in Britain but is unable to return home because he cannot get travel documents.
Last April, a court said the hospital’s decision was unlawful but Monday’s Appeal Court ruling overturned its decision. www.metro.co.uk