That's the entire point. It would be slightly technical, but as long as they add this behavior to the game, it would become actually possible. You could also potentially play any custom races against each other, by checking the boxes for their respective mods, so long as a few standards were set by the modding community to ensure interoperability. Specifically, the map or the Mods, whichever JASS file was loaded first, would need to provide a function that the one loaded secondly could call to register itself. So, the map might offer a "RegisterCustomRace" function if it was loaded first. This would ensure the Mod could inform the map which units to create, or what function to call, for players using that race on startup.
Edit: Likewise, you could have a hero arena map with 10 Hero Arena Mods that added differing possible new heroes. In that case, each mod would probably call "RegisterArenaHero", a function from the base map, to inform the map of the mod's added heroes and their Unit IDs. That's why the GetGlobalRawcodeId native would exist, to allow the mod to covert Unit IDs local to the mod code into Map "global" Unit IDs that only existed while the game was running, and included IDs from all loaded mods