Friend’s ex?

So we all go to the same school. Her and I are pretty chill, but we rarely hang out outside of school. We have a lot of mutual friends though, so we only hang out with the same group of people or if run into each somewhere. I talk to her in school, and she’s very nice, but I wouldn’t say we’re close friends cause we only talk in school or when we are hanging out with our mutual friends (which we have a lot of).

Her, her ex and some of our friends hung out together too, that’s how I actually met him.

I messaged him recently to ask him for something, and we started talking (I didn’t even know they broke up at that point). It’s super casual, no flirting or anything he’s super chill. I wasn’t secretive about it either, I was talking to her in school and told her that I messaged him and that he’s a nice guy, thinking they’re still dating and that’s when she told me that they broke up.

I’m not sure now if I should stop talking to him? And what do I do if it turns into something more than just a friendly conversation?