How to use cron to delete nodes of a content type that does not allow deletion by anonymous users
Not sure if you want to consider using it, but the Rules switch user module might be an acceptable compromise. Some details about it (from its project page):

This module adds two new Rules actions:

Switch to another user
Switch back from another user

These actions could be useful when you have an operation that you want an unprivileged user to use but it fails because the user doesn't have sufficient permissions.

Refer to the image on its project page to get the big picture. So if you'd add these 2 Rules Actions at the start / end of your list of existing Rules Actions, and you'd use some user id that does have the right permission, it should work.
As an alternative you could just reuse the relevant code (it's only 76 lines ...) to create your own custom Rules Actions. Similar to what you wrote in your question (= &quot;**...code in a custom module...&quot;).  If you make any useful improvements, please consider contributing your changes back to the module's issue queue.
Be aware, however, that this module only has a DEV version for D7 (= not covered by Drupal’s security advisory policy!). This doesn't mean that the module/code is dangerous to use/reference, but it does mean that the code has not been vetted by the Drupal security team.