[From someone who used to run a railway station]:
If you buy a ticket which is restricted to one particular route or operator, and then try to use it outside of its terms and conditions, you're regarded simply as having no valid ticket at all.
That means that the ticket inspector can charge you the full 'walk-up' fare for the journey or, if you're on a 'penalty fares' route, you can be charged a (higher than usual) penalty fare to the next station that the train calls at, plus the full walk-up fare from there to your destination. (There's also a theoretical possibility of you being taken to court and fined for travelling without a valid ticket but that wouldn't happen unless the ticket inspector believed that you were tryin to defraud the system).
If it's only a route change though, (rather than a change of operator), the ticket inspector is permitted to allow you to upgrade from one route to the other, upon payment of the difference.