Very annoyed

So I am friends with my ex. We're not together but we do talk everyday and flirt etc. So last night I was video calling him ( he was outside) and in the middle of us talking he starts talking to a random stranger and asks if he can text me instead. So I say sure but I'm pretty annoyed. I took a sleeping pill and was extremely tired but I stayed up to talk to him and he gets off the phone with me to talk to a random stranger. Then the next day he tells me he saw him at the gym and wanted to make friends so they ended up talking and smoking a blunt together (at like midnight and it's literally someone he's never talked to before.) I got mad at him because I thought it was extremely rude to get off the phone with me just to try to talk to a stranger and smoke weed with them. I told him he should apologize and he says he didn't do anything wrong and is blaming me saying I was trying to stop him from making friends, which isn't true. He is single, he can talk to whoever he wants, I just think it's rude to do it in the middle of a conversation. Now he deleted me off Snapchat and is just extremely mad at me and won't say sorry. Wouldn't you say that is rude? Would you get off the phone with a friend to try to talk to a random stranger?