Yes, but those are exceptions so under normal circumstances it is correct to say that they'd have to remain in residence for 6 years after inheriting it.
You can sell provided you use the proceeds to buy another house as only or main residence:
"However, a sale or disposal does not result in the cessation of the exemption where:
it happens after the death of the successor;
the successor was aged 65 or older at the date of the inheritance of the dwelling house; or
the full proceeds from a sale are used by the successor to purchase a replacement dwelling house, which then becomes the successor’s only or main residence. If less than the full proceeds are used to purchase the replacement dwelling house there is a claw back of the exemption in proportion to the amount of the proceeds not used."