How to grant xp_delete_file to non-sysadmin login?
Deleting files on NAS should not be done by sql server. You should rather use powershell to do it.

You can use my function Clean-NASOldFiles which uses robocopy to scan files extremely fast and will then delete based on your input.