Why not just keep a backup copy of the modified file and reinstall it when you upgrade?
That’s what I do, sort of. Since widgets.php is part of the main release, I am hesitant to just overwrite the new file with my old modified file because it is possible that the file has been modified in the new release. Instead I reapply all my fixes manually to the new file. Its not a ton of work, but it is extra work.
Ideally I’d like to have the RSS Widget set up like any other plugin, so that I can modify the plugin code like I do other plugins, via the admin interface. Then if a new version of the RSS Widget is released I can choose to upgrade it on my own schedule, as I do any other plugin.
You can probably setup a PHP include/require statement to just include a custom widgets file in your theme folder. Give that logic a try, and see how far you can get with it.