Yes the problematic thing here is not really the grandchild, yes they sound brattish and unreasonable but they're a child after all and it's not that weird or unnatural that they would be jealous of your DD who is both a better rider and has more materially than they do (although if they have a pony of their own they're hardly on the breadline but tell that to a 12-13yo). It's understandable enough that the grandchild and/or their parents would go crying to granny about how unfair it all is, and given the fact that granny probably (a) has a degree of fond partiality for their grandchild and (b) is sick and doesn't fancy setting off a huge family row, I'm sure she made soothing noises 'there there, yes it is very unfair, how horrible of sheep's DD to be showing off on my horse at PC rallies' rather than the morally correct response of telling off the grandchild for being totally unfair to someone who's doing her a favour rather than vice versa.
Where I lose the thread of rationality however is why on earth your friend, a grown adult presumably in her right mind, thought it was a good idea to repeat this conversation/ 'rant', not even to you but to your DD? What possible good did she expect to come of that, even putting aside how upsetting that is for you and DD? What does she want from you, as you say the GC doesn't even actually want to ride the horse themselves? Does she want you to keep exercising the horse but not in front of the GC or not take it to lessons/PC, is that it? That's hardly reasonable if so, and if that is her request she could have taken the trouble to frame it in a nice way rather than ranting about her GC and their troubles to a child who has no power whatsoever to help that and will only be made to feel guilty as a result? Or did she just want to vent, but again, why to the child in the situation and not you, her friend?
People who are sick and having favours done for them are sadly not immune from behaving like arseholes, so I think your approach of handing the horse back in a polite way is the kindest and sensible thing to do, it's generous of you to want to keep supporting this woman at all, personally I'd be seriously reevaluating the friendship if she'd behaved like that to my DD and certainly I'd be very wary of potentially putting my DD in the firing line again...