My 96 does something similar on occasion. It won’t allow me to turn the ignition on from lock and it's because of the lock cylinder mechanism. Interestingly, there is a way on mine to remove the whole lock cylinder quite easily from the column. You insert the key then push a small release under the column and the whole cylinder comes right out.
I remove mine every so often and spray it clean with brake cleaner then lubricate it with graphite and it works ok again. You may want to try that. Because yours is having trouble the other way, you may also want to check the steering wheel lock part of the cylinder.
Also do a search for "Toyota split wafer". Apparently this design, in an effort to prevent lock picking, can also cause problems with sticking.
Worst case if that doesn’t fix it, pop in a new cylinder and you should be good to go. Good luck.