It is (by design) not possible to delete a membership type if there are more than zero contacts with that type of membership assigned to them. The current error message just says something like "This membership type cannot be deleted."
Suggest amending to something like:
"This membership type cannot be deleted because there are some contacts who have this membership type assigned to them. You can search for contacts who have this membership type on the CiviMember >>> Find Members page (civicrm/member/search?reset=1). If you delete all memberships of this type, you will then be able to delete the membership type on this page."