How to explain to someone why I ghosted them and cut contact?

So I was chatting on the phone and online to a guy I went to school with years ago and he became more and more flirtatious and suggestive in his messages and then mentioned casually he is newly dating someone but it’s not serious. I have immediately cut contact as it’s just wrong but I have to see him at the weekend at a party shall I be honest about why I’m avoiding him?

Updates
6 mo
He sent me a message saying ‘what’s wrong I thought we were friends …’
Those messages from him were NOT between friends 🤣
How to explain to someone why I ghosted them and cut contact?
Post Opinion