Your Horse Stamina Pool is what keeps you from being dismounted.
In PvE, it is possible to ride past mobs before they aggro with RM active. PvP I guess it depends on the reaction time of the other player.
If your on the PC, there is an addon, Assist Rapid Riding, that slots the skill when you mount a horse, then swaps back your combat skill or whatever you had on the bar after you dismount.