Many different questions I have from this situation, the most important is probably knowing whether or not this guy is married, and has a family.
Even if he isn’t, Is he willing to eventually get married? Where does he see himself in the future? (Presumably, since you’re his friend, you should know this.)
Keeping in contact with him when you know he’s married is unethical, yes. Unless everyone’s happy, of course.
Personally, I feel like if both of you are not on the hook up vibe anymore, you probably could remain in contact with him. Potentially even get together too. Be realistic though, remember that there are plenty of guys that are younger and willing to live more life with you.
You would need to, however, keep firm distance from him, and ensure it’s entirely platonic until you’ve established you see yourself together with him. After doing that, if you find it’s not working, it’ll probably be best to talk to him about the complications of remaining friends with him.
And unfortunately, you would have to cut him off and move on.