Well, as a coach, I can guarantee that they have noticed her babying her ankle.

I would definitely encourage her to speak. It's a huge part of being an athlete, to communicate with the coach and take care of your body. At 10, I would absolutely expect a child to do that on their own but perhaps also be privately informed by the parent just in case (especially if it's something with a treatment plan etc).
I'd be interested to find out what "getting in trouble" means. If, as you say, she has established a pattern of crying in gym then I could see where that may be a little frustrating to a coach. This is a tough sport. There's a time and place for crying and emotional outbursts and the gym floor generally isn't one of them. By no means do I want "my" kids to be little hard robots, lol, but we do teach them from a very early age that crying isn't appropriate at gym and when it happens they are to go compose themselves and return in a more coachable state. I am more than happy to give a quick hug or quick pep talk but it hugely depends on who is crying and why, if that makes sense. Little Susie who cries over the drop of a hat will likely get very little to no attention over it other than a "go to the dressing room, have a drink and compose yourself" whereas little Sally who never sheds a tear would get a little more attention to find out why, KWIM?
Coaches can be sensitive and caring, but do realize that part of our job is to prepare them mentally for this very, very tough sport. That doesn't include being abusive or stone cold, of course, but I would venture to say that most competitive coaches would not be super tolerant of excessive crying unless there's a bad fall or bone break involved..!
I assume since you say she's doing routines that she is a competitive gymnast..? My answer would be different if she was a beginning rec gymnast.
Long answer short: I would highly encourage her to speak to her coach. A simple "coach, I landed wrong the other day and my ankle really hurts. I have iced it and rested it at home, what can I do here to help heal it?" goes a long way. Let's the coach know she is being proactive and not whiny, and taking ownership of HER gymnastics. Now, if the coach flies off the handle at something like that, perhaps this isn't the gym for you (or anyone...).

. HTH, and hope her ankle feels better soon!