What do you mean? After android 7 or 8, the "install unknown apps" permission was per-app rather than being a global setting[1]. That means you can allow f-droid to install apps but not your weather app. The only difference is that third party apps can't install apps "silently" (you have to manually confirm each install/update through a system dialog).
[1] random image result: https://media.kasperskydaily.com/wp-content/uploads/sites/92...