Professor's weird behavior
It sounds like an unpleasant environment to me. But still, this is one incident, right? So it might make sense to wait a little longer and see if this was a one-off or fits into a pattern.

If this turns out to be a pattern, you shouldn't stay in this lab beyond your Masters degree. If you really need a publication from your Masters degree (something that's not at all required in my field, for example), you should actually consider going to a different lab. If you feel like your supervisors anger, or your colleague's backstabbing, is too much, go to another lab as well.

While you are in this lab, there is surprisingly little to 'handle' about the situation. Just do your work, as separate from your colleague as possible, ignore your supervisor's anger but do try to get as specific feedback from them as possible, finish your Masters on time, get your recommendation letter and leave.

This answer sounds incredibly jaded and that's because it is quite self-centered: this is just a way for you to get through your Masters as painless as possible.