I have asked a professor if he were available for being my graduate thesis advisor, now my bachelor thesis advisor is angry with me
It sounds like you've found out the reason that Y is no longer a collaborator of X.  Furthermore, you should thank your lucky stars that you found out now, before you committed to working with X.

Assuming there are no important missing pieces in what you report, the situation is pretty straight-forward: you were entirely reasonable in telling X that you wanted to talk to some other professors before deciding, and it is entirely reasonable for you to contact Y without reference to X (X has no claim over you and your interactions).

The email that you report X having sent is absolutely inappropriate, and also clearly disingenuous: if X thinks so badly of you, why would X have invited you to work for them?  It seems clear that X is wanting to control you, and so you should definitely NOT work for X.  

At this point, I would recommend writing an email to X, stating that you found the email both highly inappropriate and also confusing, particularly given that X was also asking you to work for him.  State that because you find this inappropriate, you are no longer considering working for X.  It is very important that this interaction be in email, and that after this point you restrict interaction to email, since X has proven to be manipulative and untrustworthy and you need a written record with which to defend yourself if necessary.  I would also recommend continuing communication with Y, if this is possible despite the attempt of X to sabotage you.