Ubuntu server 18.04: suricata rule blocks dwservice, but not teamviewer or anydesk

The rule you mention is no Suricata rule but a netfilter iptables rule. So if you remove it, packets passing that filter table won’t be forwaded to NFQUEUE and thus not to Suricata. So if you forward those packets there and see them blocked you need to check the drop section in the logs.

I would recommend reading this section: https://suricata.readthedocs.io/en/latest/setting-up-ipsinline-for-linux.html#setting-up-ips-with-netfilter