If it is a 4.0l SOHC then yes, engine will need to be pulled out and new chains, guides and tensioners installed, but read to the end.
This was an issue on the 4.0l SOHC from '97 to '02 or '04, but newer designed parts are better, well lasting longer anyway, lol.
Explorer got the 4.0l SOHC in '97, you have the first year Ranger with the 4.0l SOHC, 2001
And unfortunately the ONLY way to get to the rear timing chain is to separate the engine from the transmission and pull it out.
So scary part is explained, you may be able to get rid of the rattle and rough idle by just replacing the rear tensioner.
Very good video here: https://www.youtube.com/watch?v=P4N5E_RfYpE