Of course they can pretend they are your friend. If you are very naive and gullible as well as arrogant you might actually believe you pulled it off. Beware of being too confident.
We strive to keep friends close in order to enrich our lives. We're also inclined to appraise our interpersonal bonds with consideration for the degree of "closeness" we share with one another. For these reasons, most would instinctively assume that a friend ought to be kept closer than an enemy, and this notion is only strengthened by our natural inclination to move away from unpleasantness towards the pleasant.
This particular idiom is intended to make you think, and it achieves this by creating discord with your expectations and beliefs. At first, the thought of keeping an enemy closer than a friend—or close at all for that matter—sounds preposterous, and this compels you to ponder the idea.
Now, why would you keep an enemy closer than a friend? Generally speaking, knowledge. The closer an enemy is to you, the more intimately you will come to know their capabilities, strengths, weaknesses, tendencies etc. You can use this knowledge to your advantage. A close enemy is also one you're privy to the whereabouts of, so you're much less likely to be caught off-guard.
At another level, an enemy has much—if not more—to teach you about yourself. Superficially, your own capabilities, strengths, weaknesses, and tendencies will emerge more prominently in the presence of an enemy, and this serves as an opportunity to learn and grow.
Even deeper, you can learn from the very animosity and opposition which exists between you and your enemy. We can choose to reflect upon why we are enemies with the person in the first place—does it all boil down to a misunderstanding? Am I prejudiced? Not only can we benefit by having our beliefs and capabilities challenged by opposition, but as we develop our understanding of an enemy, we may experience a shift in our regard for them. We may begin to view an enemy with less antagonism, and perhaps in time even come to know them as a friend.
I had thought this was self explanatory or perhaps you just rejected it because I was the one who posted the quotation!