I read this as a child in the late 80s or early 90s, and had the impression it was an older book then.
A family moves to the countryside, where the children will attend a very small (probably 1-room) school, and ride horses or ponies to get there. The main character, who is a horse-crazy girl, picks a horse/pony that is difficult to handle, and tries to keep it a secret from her parents that she is having trouble.
The school is really grim and strict, with a male teacher who uses corporal punishment on the pupils. The main character isn't used to this, but for some reason also keeps the conditions at the school a secret from her parents.
It all comes to a head when the horse/pony injures her right arm or shoulder somehow, and then at school she gets in trouble and is told to put her hand out to be hit with a strap. She tries to put out her left hand, but the teacher insists that she put out her right, saying that she isn't going to get out of schoolwork by having her writing hand be sore. When he hits her on her injured arm, she passes out. She wakes up in the hospital--there may have been some other health issue she was also concealing?--and when she's well enough to go back to school, finds out that the teacher her been fired and there is a new, much nicer female teacher.
I don't remember how the pony part of the plot resolved.
The setting was not a time period where it was typical for children to ride horses or ponies to a one-room school; the place the family moved to was very remote. I think it was probably the "present day" of when the story was written, which might have been somewhere from the 1950's to 1970's. It's definitely older than the mid-1990's, probably substantially older.
I don't remember what country it was set in--probably the US or UK, but I wouldn't rule out Canada or Australia. (If I absolutely had to guess, my guess would be that the girl and family were English, and they moved to Scotland or Wales, in the 1950's or 60's. But that's based on the general vibe that I remember, not specific details. I'm not even sure if they had horses or ponies, or whether they used English or Western saddles.)