It's a well known fact there were dinosaurs in the old west. Sheriff Rex was the best known Tyrannosaurus law man of the time.
All joking aside, are you sure it wasn't a Tex Avery cartoon? I think I remember there being one that was a caveman version of a western, and everyone rode dinosaurs instead of horses.