Do you mean “can I add a standalone DNS server to my Network-attached storage (NAS) device?”
maybe. Depends on how commercial black box versus home brew (open source) your NAS device is. Most NAS devices tend to be BSD or Linux kernel based devices.
You can build a NAS on clone PC hardware by adding an open source Linux NAS package (see Sourceforge). In that case you should be able to add any service, if you can find your way around Linux, have the tiem to research, and have the hardware horsepower remaining (memory and CPU and network bandwidth).
But the more commercialized professional NAS are locked down pretty tight against tampering. And make no mistake if you are adding DNS to a commercial NAS box you are tampering with it in both the legal patent sense and likely its ability to 100% reliably do its job. The engineering of a commercial NAS for security and performance is often pretty tight on some parameters in order to squeeze out profitability and avoid lawsuits.
On the other hand some of the smaller, less commercial, more open source boxes occasionally tout their ability to pick up minor scale services like DNS. But then their warranty and patience and help is not likely to inexhaustable either. They are trying to make a living and their time is money. Don’t be too cheap.