Swap SSD between two 2011 MacBook Pro 2011 machines
Yes, it will definitely work. OSX comes with all the stuff you need to run on almost any Mac hardware (because they control it). In this case, the situation is better, because both machines are very similar.

You can safely switch them.