Any sim can use the freeze ray if they have one in their inventory. Before seasons, you could get one using cheats in build/buy. As others have mentioned - you can now purchase a freeze ray as a gift on the computer if have seasons. I do not know how your doctor sim got a freeze ray - no sim just gets them automatically (even scientists have to make them) except for perhaps townie aliens that someone mentioned (not sure - have never checked a townie alien inventory). If you have seasons and celebrated Winterfest or any holiday with gifts - it is possible your sim got it as a gift. As others have said - the sim that was frozen will go back to normal - they will just be blue for a little while.
I am curious if seasons has any effect on this now though - like what would happen if you freeze ray a sim outside when it is freezing out - wonder if the sim would freeze to death (since it happens pretty fast) before it even broke free from the ice? The animation for freezing to death is the same as the freeze ray - covered in ice - other than they fall to the ground vs stand. Anyone tried this yet?