If Moodle is running on another port (other than 80), then you should be able configure your router to access it similarly to your NAS on port 5000 (i.e. via port forwarding).
However, if Moodle is running on port 80 on the NAS (or you do not wish to have a port number visible when using Moodle on another port), then you will need to set up a reverse proxy on your network. In short, a reverse proxy listens for incoming e.g. HTTP requests and facilitates directing those requests to the proper server. It also assists in relaying responses back to the original client.
Creating a reverse proxy typically involves simply configuring a server on your network to handle this function. While it may be possible to do this via your NAS, you'll likely have a bit more control over the PC with just the web server. In that case, your communication chain would probably be:
<Internet> <---> <Router> <---> <Web Server [Reverse Proxy]> <---> <NAS>
Note that while your <Web Server> is your reverse proxy in the diagram above, it can still hand out websites configured on that server.
The actual steps to setting up a reverse proxy will vary with the device or software used. For instance, Apache uses certain modules and "virtual hosts" while Nginx uses (virtual) "server blocks" and your NAS may have its own way of being configured.
Regardless, as a general rule, you will want/need a second domain name (dynamic or otherwise) to access Moodle. This is often the easiest (or only) way to distinguish websites running on the same IP:port combination. This can potentially be a subdomain (i.e. http://subdomain.example.com).