Is it possible to use a 21" iMac as an external monitor from a MacBook Pro via Thunderbolt?
The answer is sometimes yes. I found a list of iMacs that support "Target Display Mode" here ...

http://support.apple.com/kb/HT3924#1

... and it includes "iMac (21.5-inch, Mid 2011)" and "iMac (21.5-inch, Late 2012)".

That would imply that any iMac with a Thunderbolt port can be used in Target Display Mode.