Run functions from an SD card? (without bootloader)

Juraj:
Optiboot 8 has do_sdm service function. I use it here to store new version of the application in upper half of the flash memory (and later to copy it to flash beginning to run it after reset).

the call to do_spm self is an example of call to independent 'module' in flash

But this is only a "bootloader in a disguise". This will not help if OP wants to change the code so often a flash wear may cause problems.