Setting a custom IP doesn't work?

If the VM has two IP addresses, you don’t need to do anything with the docker container IP address, you just need firewall routing so that …1.3:80/443 goes to the host and …1.4:80/443 goes to the docker container.

If this is Linux, AFAIK iptables and ufw are the most common software. You would probably need to look at the documentation or ask in their communities for help with how to set up that routing.

Unless you need to test this kind of setup for where you would ultimately want to install Discourse though, I would still recommend just running a second VM for this trial. Any complexities of running Discourse alongside other HTTP/HTTPS software goes away with it running inside its own VM.