Yes I think you can, although it depends upon the reasons or way that the relationship ended,. The friendship though won't happen immediately, it is something which grows with time, especially if you are thrown together a lot by your circle of friends.
I have several friends, whom I really loved, or thought I loved, who have became really good friends.
Although I don't see them as much of them today as I did then.
Some of these go back to first boyfriends, from school days, until I married.