A better question is should they
Personally I avoid such complications, there are a couple of acquiantences, both male and female, that I know since childhood and keep it that way most of the time. During adulthood especially if you're trying to build a stable life I don't think it's worth it for both sides, building a family should not be taken lightheartedly.
So to answer the question yes ofcourse they can be friends, but depending on where you're headed in your life you may or may not want find it to be worth the headache. Better stay formal unless you want to hook up, makes it easier for everyone.
Same can be said about any relationship really regardless of gender, but male-female are bound to be more sensitive.