Yes! this can be done, and people report that it works really well! mainly this is for the 2013-2015 Year Macs. Get the adapter from Sintech or other parties.
You need to be running 10.13+ and a few steps are needed Mac rumors has an excellent guide here.
Then you can use the super fast and less expensive NVMe M2 drives in your Mac!