I sold a house last year that was jointly in the names of my wife [who has dementia] and myself. We did not sell the house to pay care costs though. My wife's care is covered by the NHS and she lives in a nursing home. However, the house was too big, too expensive to run, too isolated and had too many memories for me to remain there alone.
We had a registered EPA already, and this enabled me to sell the house, and purchase another one - still in joint names [though Jan will never see it] to protect her equity, in case that is ever called on for care costs.
My understanding is that, not only do you have to have a registered EPA, but that you may also have to have a trustee appointed to look after the person's interests.
See a solicitor or, better still, either phone the Alzheimer's society help line, or call the Public Guardianship Office.