Yes, but only if both of you have genuinely moved on and can maintain healthy boundaries. A friendship can work when there is mutual respect and no lingering romantic expectations.
However, if you still have feelings for your ex, staying friends may ...