Setting permissions for which networks an app can access
You can try NetGuard - no-root firewall to block internet access for apps selectively (forbid an app access to WiFi or cellular data). It works without Root as name suggests. It's available from Google PlayStore as well as from F-Droid.
You can use it to disable particular apps from accessing internet while you're connected to your work/university/school network.