Hi,
I think it very likely that he was in the workhouse for hospital treatment, as Greenpaula suggests.
William has a death notice in the Lancaster Gazette (from the online newspaper archive) which would be a strange thing for a pauper to have.
You can see from the map on the workhouses.org site (Hi Ken

that there was an infectious diseases hospital on the same site, but you would need the death cert to tell you that.
Lancaster Gazette Saturday, February 05, 1853; pg. 8; Issue 3435
"Lancaster: on the 1st inst., Willliam Stephenson, Workhouse, age 70 years."
Might be his wife, died just a fortnight earlier? Or is she too young to be his wife?
Lancaster Gazette, Saturday, January 22, 1853; pg. 8; Issue 3433
Lancaster, on the 17th inst, Elizabeth, wife of William Stephenson, Church St, aged 53 years"

Barbara