In the ladies doubles final the trainer was called on and the player then donned a blue glove and rubbed cream on her thighs as the trainer wasn't allowed to? Why not?
You've answered half the question, IF the Trainer was Male (I don't watch Tennis so I wouldn't have seen it). Most likely to avoid a Sexual Harrassment charge.
If it was a Woman then I believe the same would still apply.
I'm guessing that it's to do with the specific area of the body afflicted. A Knee, Calf or Ankle could be worked on by the Trainer without incident - working on the Thigh could be too risky, despite hundreds of pairs of eyes and the Cameras around the Court.
The trainer was female. I think the player had cramp, which the trainers are not allowed to treat as it's thought to be a lack of conditioning rather than a medical problem. So she gave the player and glove and cream and told her to apply it herself.
WTA rules allow on-court medical treatment solely from the tournament's own PHCPs (Primary Health Care Providers). Player's trainers aren't permitted to provide treatments but players are still permitted to treat medical conditions themselves.