Not just locally on the device! There must be an error when calling or texting the number.
Data must work for internet for Signal, VoIP, etc.
This is for a UK PAYG SIM.
There should be no way for anyone to demand my number, or for me to leak it, or doing so should be irrelevant as it does not work.
AFAIK this is not possible for a working number. Failed dial tone and “text message not delivered” are handled on the carrier level, if you block a number then they’ll just get a “busy” tone when calling and nothing when texting. You can’t blanket reject everything while retaining data, unless you disconnect from cellular and only use WiFi.