Well I'll just repeat what I failed to express previously, your wish to block specific ports will also disable online access for other, necessary for basic functionality. Again, it's the operating system that manages ports, not your apps. Also, WhatsApp being a multi-functional service, its app is also an integrated one involving those multiple services so, yeah, it would require a modification of the app itself on your device, or altering its source code and recompiling a new app, to selectively disable one particular feature. Keep in mind WhatsApp is not an Open Source project, nor is its app so even if you were to hire a developer to alter it to your liking it's not a legal venture.
If your primary goal is to eliminate text messaging but you want to continue WiFi calling it doesn't seem like using WhatsApp is the best option for you. There are plenty of text messaging apps and plenty of WiFi Calling and VoIP apps available. Plus a lot of text messaging apps are now including WiFi Calling functionality. Just as an example my preference the Signal Private Messenger app allows one to do WiFi Calling. And for voice and video calling there's Google's Duo app, available for both Android and iOS.
A primary appeal to WhatsApp is its own expansive messaging service but that's what you're trying to bypass, are there other reasons as to why you want to use Whatsapp for this matter?
And just to emphasize, regarding the NoRoot Firewall app, there are plenty of viable alternatives that are more current and have more expansive feature sets than NoRoot, an example being support for IPv6 TCP-UDP. Also NoRoot can only provide you with full functionality with WiFi but only partially with mobile data (cellular) because while other newer firewall apps support LTE, NoRoot does not.
As for the rooting issue, it was not a suggestion or recommendation but rather just reference because of the issue involving non-root firewall apps having only limited ability over lower-level system processes. A significant issue with root-required firewall apps and non-root ones is the difference their basic functionality. With root-required firewall apps, they have access to iptables, a well-developed, fundamental firewall that's an integrated service in the Linux kernel itself. So a root-required firewall app will just tie itself into iptables. But a non-root firewall app being installed by the user does not have any access to iptables. Most non-root firewall apps instead rely upon a clever work-around using a local VPN service. It's not a VPN that involves some remote servers in the cloud (i.e. a VPN service you pay to set up an account with) but rather one that runs solely on your device, so the filtering rules you set up get applied to the networking traffic as it gets looped back through this localized, internal VPN.