Unequivocally yes!! You can have the best read on a friend and she/he (in my case, she) can treat you like a princess throughout the course of a long friendship, put you on a pedestal where you can do no wrong. However, friendship is easily maintained when it is not tested or when the friendship does not interfere with what is desperately important to one of the friends.
At my last job, where I worked as a paralegal, I was the favorite of one of my bosses and was treated nicer than the other attorneys. I never took advantage of this nor attempted to influence any personnel issues as a result. My best friend at work was aware of the favoritism and, at the time, I thought she did not mind. We were good friends to one another. I bonded and babysat her daughter and she always praised me to others.
However, one day, when Carolyn bent over while wearing a mini skirt showing our boss her thong, my days of being favored was over. She became the new favorite and reveled in it. She saw me as a threat to his new relationship with her and made my life a misery by distributing very personal e-mails of mine that I had sent to her to people in the office, I suppose to undermine my credibility if I caused problems with her and Brian. She told me blatant lies about gossip being said about me such as one very busy attorney compiling a dossier to get me fired. This was just ridiculous. This attorney was too swamped with work to do this. Every e-mail I sent her was forwarded to my supervisors. She finally told me that, she because of her friendship with Brian, she was in a good position to get to comply with all office directives. I threw her out of the office, advising her I was afraid of no one. She bad mouthed md to all my supervisors and co-workers and the rose had fallen off the bloom simply because she feared that this married boss, who could do nothing for either of us, continued to harbor any warmth toward me. I resigned as a result of this mess.
To this day, this was the worse betrayal I suffered from a friend. So, yes, friends can turn into foes.