As the NAS and the ESP8266 are on the same network, then assuming that the DNS scope is for the same subnet, the answer is that the ESP8266 can "see" the NAS device.
Your question is,
"Is it possible to make a setup like this? Send commands from my NAS server web page to the esp8266 through my router. To turn on I/O pins on the esp8266 and back again to update web page/database on NAS Server database mySQL."
I am not going to give a Yes/No answer because I have not personally performed such an experiment. However, the ESP8266 can act as a client which means that if it can see the NAS it should be possible to connect by passing the user/password and any other credentials. The ESP8266 would then have to navigate the webpage... this is where things get complicated since the HTML page would require parsing and the ESP8266 may not have sufficient buffering capability.
Many NAS devices that have HTML front-ends also have (S)FTP capability. That could be more interesting. But, back to topic...
Not trying to be rude, but I think this is one of those situations where 'if you have to ask' the answer would drift into the "highly unlikely" area. IoT stuff generally relies on back-end web API calls to avoid the complexity of dealing with a human GUI interface directly. Sites such as weather underground have documentation for small devices.
Ray