Can I swap an Apple SSD from one laptop to another?
This would probably work OK, but it would probably be easier to just mount the drive externally and copy your files over to the new machine. That way, you wouldn't need to open up the new machine and install the old SSD.
You could mount the SSD on the new machine with something like this: Seagate Backup Plus Desktop Thunderbolt Adapter https://www.amazon.com/dp/B009HQCAPQ/
I'm pretty sure it will work by just swapping the SSD. But remember a few things:
You will void the warranty by opening up the laptop
You might break the laptop if you are not experienced in opening it up.
I would just recommend a USB SSD drive enclosure like this one (definitely not the best one but it works). Then transfer all the datas from the old SSD to the new one. Plus you can use the old SSD as an external storage.