Only paid versions of avast have the ability to nominate folders that they want protected from encryption from ransomware. The avast free version it trying to detect any ransomware before it gets on your system, this preventing encryption, so it doesn’t go as far as the paid versions of avast.

I don’t know if the ransomware protection in the paid versions of avast would/could be extended to cover NAS systems.