Is it possible to put mdf and ldf to NAS (Synology)
You should be able to store the files on the NAS.
A bigger problem will be moving between PCs. Each machine will be its own instance of SQL Server. It will not be possible for both instances to own the database files at the same time. You will have to attach the file to one instance, work on that machine, detach from that machine, go to the other and attach the files to that instance before you can work on the DB.
A simpler approach would would be to have one of your boxes (the more powerful one) own the files permanently. Use the other box to remotely communicate with the owning box. Use a remote desktop session, or simply have SSMS (or other client tool) resolve to the host\instance name.