I have a 1957 TO35, it has crossed gears a number of times on me over the years. The shifter rails are worn.
As others have said, try to get the hi-lo shifter into neutral, if possible. With clutch pushed in or tied in the down position, whatever you have to do.
Open oil fill cap, use a large screwdriver and try to move the shifter, most times the shifter will slip back into the proper position.
Whatever you do, do not place so much pressure on shifter that you break a part off. If you can not get it to slip back into position, you will have to call a mechanic.
Advice that has worked for me: once you have the shifter back into the proper position.
You must, must, must retrain yourself how to shift the tractor. When shifting always keep a slight downward pressure on the shifter lever. Most time mine locked when I was backing up, then started to shift to a forward gear. When I applied the brakes in reverse my body would go slightly backwards with my hand on the gear shift, I would pull up on the shifter lever as I shifted the transmission, that is when it crossed gears.
Shift slow with downward pressure on the shifter lever. This procedure has worked for many years for me, cannot remember the last time it locked.
When was the last transmission/hydraulic/differential oil change?