You can do it for sure, but you don't want to reimport the files or you'll lose the stats. Here's how to keep your stats and make the change without reimporting. Step one is to back up your library before you change anything! That way you can revert if you need to. Step two is to turn off auto-import/import files in the background, etc. That step is very important so that the library doesn't accidentally remove missing files if the files are no longer available at their original mapped drive address during the transition.
Once you've done those two things make the changes necessary to Windows or your NAS to make your files accessible via IP/UNC path, etc. Then select a small handful of files in MC (not all of your files!). Once you've made a selection, right click, and in the context menu open Library Tools-->Rename, Move, & Copy Files. This will open a dialog box. In the upper left hand corner change the setting to "Update database to point to new location." As long as you only use the "update" option of the rename, copy, move tool, MC will leave your files alone and just make changes to the database (which you backed up at step one). But be careful, because if you accidentally use the rename option instead of the update option you might wind up moving your files around in ways you don't want. Rename, Move, and Copy Files is a powerful tool, so check everything carefully before you execute!
For your specific case, once you've picked "update" in the upper left, you'll want to use the find and replace tool in the lower left corner to swap out the mapped drive address to the IP prefix (i.e. replace M:\ with \\192.168.51.50\ or whatever). Then once you're happy with how the find and replace preview looks, execute the rename. The old library entries for the small selection of files you chose should now point to the new location and you should keep all of your stats and be able to play the files. If everything works just right with the small sample, you can then do this same process for all of your files at once. If it didn't work just right with the small sample, restore your library from backup and try to figure out what went wrong.