However, repayments are likely to cost in the region of £80 million and charities are concerned that mental health services may end up suffering if local authorities are forced to find the money from existing budgets.
"We welcome the clarification and urge that repayments be made as soon as possible to spare people any further unnecessary financial difficulties," said Gil Hitchon, chief executive at mental health charity Maca. "However, it is important that such payments are not to the detriment of cash-strapped mental health services."
Under section 117 of the Mental Health Act 1983, people who have suffered mental illness and have been subject to compulsory detention in hospital are entitled to free aftercare services.
However, local authorities, commonly charged for aftercare until a House of Lords ruling in July 2002 confirmed that the practice is illegal. Some patients were forced to sell their homes to pay care bills.
"It is appalling and shocking that for years local authorities have broken the law by charging some of the most vulnerable people in society for aftercare services that should always have been free," said Cliff Prior, chief executive at Rethink Severe Mental Illness.
The ombudsman's decision last week follows a similar ruling by the health service ombudsman in February regarding payments for nursing home care of people with long-term conditions.
Maca and Rethink want the Government to set aside funding for repayments.
"It is vital that mental health services are not put under even more strain," said Prior.