Yes, that is very easy possible. Let me assume you are using an UltraEdit version with ribbon interface.
Select the last ribbon tab Advanced and if the macro file containing the macro (and others) is not yet loaded, click in third ribbon group Macro on item Load and load the macro file. Then click in same ribbon group on down arrow right to item Configure and click in the opened popup menu on second menu item Configure macros. In the Modify Macro window can be configured the Hotkey or Chord (multi-key assignment) to run the macro when the macro file containing the macro is already loaded.
The macro file containing the macro to execute by key and perhaps also other macros should be configured to be automatically loaded on startup of UltraEdit. So I suggest next clicking once again on the down arrow right to Configure and click in the opened popup menu on fifth menu item Set macro for auto-load. In the Set Macro Auto Load on Startup window browse to the macro file containing the macro(s) to load automatically on startup of UltraEdit.
Best regards from an UC/UE/UES for Windows user from Austria