Oops, I was wrong, that only allows access from localhost and the docker subnet.
The solution comes directly from docker's documentation: there is a chain, DOCKER-USER, that can be used to filter local traffic:
iptables -I DOCKER-USER -i wlan0 ! -s 192.168.1.0/24 -j DROP
https://docs.docker.com/network/iptables/#restrict-connections-to-the-docker-host