You're right — there is no difference between those two pronouns on the surface.
If all I had was « Elle m'a demandé » I would assume me was a direct object. "She asked for me."
If me were meant to be the indirect object, you would probably see a phrase like one of these instead:
Elle me l'a demandé. She asked me for it.
Elle (l')a demandé à moi. She asked me (and not someone else).
When demander has both a direct and an indirect object, the direct object is the thing being requested and the indirect object is the addressee:
Elle m'a demandé une lettre de recommandation. She asked me for a reference letter.
Elle me l'a demandée. She asked me for it (=the letter).
In both cases, it's clear that me is indirect because there's an unambiguous direct object.
So what if you only have one? The direct object alone works pretty well.
Elle a demandé un verre d'eau. She asked for a glass of water.
Elle l'a demandé. She asked for it.
The indirect object alone feels more unfinished without further context.
Elle lui a demandé. She asked him.
For what? The direct object would have to have come up earlier to be omitted now.
One situation might be if you were stressing who was asked — but then you would use the disjoint at the end of the sentence:
Hier il a demandé à Jeanne si elle était célibataire. Yesterday he asked Joan if she was single.
il m'a demandé → il a demandé à moi ! Huh? No, he asked me!
Another example might be if you're stressing the action of asking:
Elle aurait dû demander à toi si ça serait OK. She should have asked you if that would be okay.
→ Ben oui, elle m'a demandé en fait. Actually, she did ask me.
This does look like your example sentence, and is fairly unambiguous.
But since you need some context to make that work, if I encountered « Elle m'a demandé » in the wild, I'd assume me was the direct object.
This is even more true when you consider that the above sentence is more likely to come out as this:
Ben oui, elle me l'a demandé en fait. Actually, she did ask me that.
There are two reasons for this. First, as qoba says below, it's to address the exact problem you raise: if you don't include le, you can't be 100% sure about me.
Second, it's just a little more natural in French to include the pronoun le even when the direct object is a whole clause, and even when English would omit it:
As you know, letters are intended to be for current students.
→ Comme vous le savez, les lettres sont destinées aux étudiants actuels.
Then will you help me? — Yes, I will.
→ M'aiderez-vous donc ? — Oui, je le ferai.
So "he asked me" (or anyone else) is pretty unlikely to appear word-for-word in French.