You can on Android, using this: https://f-droid.org/it/packages/com.celzero.bravedns/ (it's also on Google's store: https://play.google.com/store/apps/details?id=com.celzero.br... )

Set it as a local proxy to channel all network access through it and you can selectively block any app from accessing any network, or isolate it.