This is a good question. Personally, I think the ambiguity would be resolved by several factors.
Firstly, voice tone; there would likely be a tone of voice that conveys sympathy towards the child.
Secondly, I think context plays a part. If the mother were sad and the child were crying for her, that phrasing would probably only be used in a situation where we were aware of the mother’s sadness/plight. If this situation did occur, and the listener were unsure as to the meaning, I can imagine them requesting clarification.
I also think that in this specific example differences in age/maturity could play a part. In “crying for” someone, we are expressing/experiencing empathy/sympathy. I think there is a general awareness that a young child doesn’t yet possess the capacity for the depth of emotion that would warrant phrasing along the lines of what we mean by “Don’t cry for me.”
I think it’s also worth noting that the “Don’t cry for me” phrasing of “crying for” is somewhat poetic, and might be said more basically as “crying over”, “crying because of” or “crying about”, depending on the context.