It likely won't be safe - they're probably going to enforce it through a Google Play Services update rather than an Android update, which means all previous Android OS versions after 5.0 (Lollipop, released in 2014) will be hit with the changes. In order to bypass that you'd need to install a Custom ROM or stop using and uninstall the Google Play Store entirely (since it's not possible to selectively disable just this).
Android uses Google Play Services updates to update some features or security without relying on manufacturers to update the OS and drivers.
I seriously doubt they can restrict sideloading through Google play services.
But if they do then it’s worse than what I thought.