Edit: Based on OP's clarification in comments and subsequent search - Call Barring refers to both incoming and outgoing calls being blocked whereas Call blocking/Number blocking refers to only incoming calls being blocked.
To answer OP's question
Thanks to Andrew's inputs in comments
call barring is usually available on most phones (e.g. OPPO R11
, Huawei P10
, and even on older feature phones), but the service is linked directly to the SIM provider. That's why it also asks for the code before changing the settings.
Section below is retained for reference, just in case this confusion arises again
Number blocking was introduced in Android 7 and it is not depreciated AFAIK. I have been using close to stock devices(Moto, Android One) and found this feature, usually in the SMS & phone apps. I am currently on Android 10 with Oxygen OS which is considered close to stock and this feature is present
The default SMS app, the default phone app, and carrier apps can read from and write to the blocked-number list. The list is not accessible to other apps....
Additionally, carrier app integration through Android means that carriers can read the blocked numbers list on the device and perform service-side blocking for the user in order to stop unwanted calls and texts from reaching the user through any medium, such as a VOIP endpoint or forwarding phones
The article you linked pre-dates Android 7 and mentions specifically that it is not a standard Android feature and goes on to give examples of OEM implementation. See Implementing Block Phone Numbers which says
Before N, Android users had to rely on downloaded apps to restrict calls and texts from bothersome phone numbers. Many of those apps either do not work as desired or provide a less-than ideal experience because there are no proper APIs for blocking calls and messages.