Yes you can, but it is only a very small minority who can do this.
Im best friends with my ex because we had a great friendship when we were together and we're completely compatible personality wise, but we split up after 8 years because we weren't sexually compatible. Id be pretty lost without him to be honest because he was and is a big part of my life and he is probably the only person who knows me inside and out. I know we can be friends because there's NO TEMPTATION TO SLEEP TOGETHER. We didn't sleep together for the last 2 years of our relatonship because we didnt feel that way about eachother anymore, so thats how i know we can be friends.
The only issue with being friends with an ex for anyone else is the temptation to sleep with them. You could turn them into a **** buddy, but since you had a relationship with that person, it can be a bit messy emotionally. I find it easy to be friends with ex's. I dont think my current boyfriend could be friends with some of his ex's because i know they probably still find eachother sexually attractive - and that wouldn't be a friendship if the temptation is there.
I wont settle for anything else!