Welcome to the forum
Reads like M5OD-R1 trans has lost 2nd gear syncro and 3/4 shift rail/forks are having a problem.
Not hard to rebuild but some special tools and knowledge is needed, knowledge can be found on-line or in books, the tools you have to buy or rent.
Used M5OD-R1 transmission are a fairly safe bet, they don't fail often and it is usually do to low trans fluid level or putting in gear oil instead of ATF, yes these manual transmission use ATF.
M5OD-R1 is often called M5R1
They have integrated bell housing so you can only use an M5R1 from a 3.0l Vulcan engine in your 3.0l Ranger.
Also from a 4x4, although you can swap your tail shaft and housing over to 2WD M5R1
M5OD-R1 is a Mazda transmission, used in Rangers, Explorers, B-series, and Aerostar vans
A Mazda B-3000 M5R1 would work for you as well
M5OD-R2 is a larger version used in full size trucks and vans, F-series and E-series