A factoid about Anthony Burgess and ACWO: "After doctors found a cancerous tumor in his brain, he wrote "A Clockwork Orange" in a hurry, hoping that the money made from the book would support his wife after he died. He later found out that he did not have cancer."
Being a friend "to" someone or some organization is valid English, although it is less used. It implies a kind of activism in the "friendship", which also may be one-way, e.g., "He is a friend to endangered species around the world." That means that he supports efforts to protect the endangered species, either through money or effort, and, obviously, the endangered species would not be a friend of his.
If you said, "He is a friend of endangered species", that thought actually makes little or no sense, because it does imply a two-way relationship. So, in speaking of such one-way "friendship" or support, you'd always want to use "to" and not "of/with".
"Друг" - is used with a masculine friend;
"Подруга" - is used with a feminine friend. But if a boy calls a girl "подруга" it has a dual meaning - in one case it means that she is his friend, in another his girlfriend.
"Ты мне не друг" (you are not friend of mine) means in Russian "you don't have friendly relations with this person and you don't want to have it", "communicate with me formally only, I don't want to talk friendly with you" or "I don't want to communicate with you at all". This sentence can be used also to say someone a phrase "you are a stranger to me", when you want to say "stay out of my life".
"Ты не мой друг" / "ты не моя подруга" (you are not my friend) - this is another sentence with a different meaning in Russian - "you don't have friendly relations with this person", "you are not my friend, but you are a friend of another person". This sentence can be used also to describe a situation"stay out of my life" if one would say this phrase with anger. Thus, the last sentence depends on the context and the intonation (edgy, etc.)
It is exactly the same in English. "You are no friend of mine" is definitely saying "I dislike you, I do not wish to be friends with you". "You are not my friend", without some context to make it stronger, is just a statement of fact (although it's hard to imagine a situation in which it would be truly neutral and not a bit insulting).
Odd that Duo has not introduced the word "подруга" yet.
In English, "girlfriend" has undergone a slight expansion in meaning recently. As a standard starting point, when a male mentions "his girlfriend", he means a female with whom he has some sort of romantic attachment. A female friend is "a female friend" a "a friend", not a "girlfriend".
Between women, a "girlfriend" can be either just a friend who is female or a romantic relationship. Some gay men use the word in a similar way to talk about other men or women.
True, there is no literal we but there is you and there is me. Naturally not a word for word literal translation, but then again, none of this is, or it would sound strange. We try to convey the thought, right? Otherwise we'd simply say something like "you, with me, no friend"
We never try to convey the thought, we translate: Doing a litteral translation of the words (ты = you, for example), then giving it a sense in the other language according to its grammar.
You cannot say "You, with me, no friend" because it is grammatically incorrect in English, so you would say "You (Ты) are (/) not (не) my (мне) friend (друг)".
We translated all the words of the russian sentence, moved them a little bit so it means something in English, and everyone understand you properly!
Note: It is sometimes acceptable to change some words of the sentence and do some big changes in the meaning if the russian sentence has a really special translation... but here, it is definitely not the case, the words are really simple and the construction is easy to translate almost litterally into English.
In your example, wouldn't мне be "to me", which is a valid way of expression the concept in English ("You are no friend to me"), while ты не мой друг would be "You (are) not my friend". The two sentences have very different connotations.
From reading other comments in this thread, I get the strong impression that the difference in the English has the same distinction as the difference in Russian.
I bring this up because the first definition of Dative case I encountered said that: "Dative case designates that something is given or addressed to the person (object)." That suggests that "to me" should be the first meaning attached to Мне.
It is not a good translation, so Duo was right to mark you wrong.
"a good friend" = хороший друг, and хороший isn't in the exercise sentence.
Also, the concept of "no friend" = the complete absence of a relationship is very different from "not a good friend" = a poor relationship, but a relationship none the less. Absence vs. presence.