When I'm talking about my friend, who is a girl, but not a girlfriend, what word or phrase should I use? If the gender was unimportant, it would not be a problem. But if I want to note that the friend is female, not male, how should I say that, to avoid ambiguity?
My female friend is a perfectly acceptable and understandable way of putting it. A slightly more awkward phrasing that I have also heard is My friend, who is a girl....
There's nothing in the language that requires you to characterize with a noun. You can frame your discourse much less awkwardly with constructions like:
My friend Sidney? she'll be there, too ...
I have a friend, Sidney, her command of English is amazing ...
There's this girl, Sidney, friend of mine from school ...
You know my friend Sidney, Ed's little sister ...
My friend Sidney's pregnant ...
Talk about the person, not the role, and Great Mother English will take care of you.
If you are a male, the phrase "female friend" works. If you are a female, the phrase "girlfriend" is actually acceptable, though somewhat uncommon depending on region. But English speakers tend to be unspecific unless the conversation requires you to specify your friend's gender.
Probably the easiest and simplest way is to just call her your friend and refer to her with a female pronoun. For example, "My friend Sidney is helping me move. She'll be here in an hour."
"Female friend" or "girl friend" is grammatically correct, but it calls a lot more attention to gender, which can be awkward. (If you talk about your male friends as "friends" and your female friends as "female friends," it implies that they're somehow a different kind of friend because they're female.)
You might say "my friend <her name>", if her name is unambiguously female. That avoids the problem without being specific about her gender.
It's not unusual in this situation to dispel ambiguity by further specifying the origin or current context of your friendship. This can be done with a simple compound of the context and the word friend (alternatively, 'partner' or possibly 'buddy' - although this is more commonly applied to men).
If you wish to make gender obvious, then it's best to use a pronoun to do this.
My platonic lady friend.
This states that you are just friends. Platonic says your just friends and avoids lady/female friend being interpreted improperly.
As suggested by J.R. as well, you can say:
She's a platonic friend.
Here gender is shown by the pronoun she.
If it's just some girl you know, try:
A friend of mine, her name is Hildegart....
Hildegart, a friend of mine...
if it's your girl, use:
My girlfriend Hildegart is giving the ...