On macOS, yes. If your app is sandboxed then it can only access the network if it has the relevant entitlements.
I suspect, however, that you’re talking about iOS. There’s no equivalent mechanism there. I’ve seen this come up a few times and, honestly, I kinda agree with you. Speaking personally, I’d like to see this at both the code level (like macOS) and at the user level (something in Settings to disable the app’s access to the network).
To formally request this, I encourage you to file an enhancement request describing your requirements. Please post your bug number, just for the record.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"