I want my users to
- rename the documents
- But not delete the documents
Is this possible in SharePoint Online ?
As JoannaW_MSFT mentioned in her answer, if you prohibit deletions via a custom permission level, you will also lose an ability to rename files, unfortunately.
If the user has Contribution permissions without Delete Item permission, he will get Access Denied when edit the name of the file. Contributor users are not able to rename items in SharePoint if the Delete permission level is removed from the Contributors group.
It is by design and is mentioned in this official article: https://support.microsoft.com/en-us/help/2505742/contributor-users-are-not-able-to-rename-items-in-sharepoint-if-the-de.
If you want to make sure you can't delete documents, you can simply enable SharePoint retention policies via the Security and compliance center. This way, all deleted documents will be moved to the Preservation Hold library for any specified duration of time.