Any debts secured on a property will have to be paid off when the house is sold, so your scenario can't happen.
Unsecured debts are not attached to a property so can still be live after the house is sold but these won't show on the Registered Title and you can't access the credit report of the previous occupier.
You can download the Title Register from the Land Registry for a small fee, but it won't show unsecured loans.
Whilst it is impossible for secured loans to be transferred with the sale, it is possible that bailiffs will call at the address looking for the previous owner in respect of unsecured loans.