How can I perform modifications on host system from a flatpak install?

No, there’s no way to run unsandboxed code during installation. post-install is run after the install phase on the build machine, not the target.

If you have the permission needed to use flatpak-spawn --host, there’s nothing stopping you from using it from a wrapper script at run time. Though doing something that requires superuser access would be, I think, taking things too far.

Your best option is probably to document that the user needs to add themself to that group.