A Vulcan 3.0 is basically the same in FWD and RWD applications. You'd need to use your Ranger head gaskets and intake/exhaust manifolds, but the short block (block and heads) is interchangeable. It's probably a good idea to put the Ranger oil pan on the new engine too. I know the Taurus pan will work on a 98+ 2WD Rangers but it may be different on an I beam 4WD truck. This means a Vulcan 3.0 from a Tempo/Topaz, Aerostar, Probe, Taurus/Sable, or Mazda B3000 will work as a donor engine. If you're looking at an engine from a Taurus/Sable, just make sure it's the Vulcan OHV 3.0 and not the Duratec DOHC 3.0 since they used both (I believe the Vulcan was the only 3.0 offered in 97, so the car in the add should have the right engine but double check).
Now, on to your possibilities. If blown head gaskets are all that was wrong with your 3.0, then it's a relatively cheap, easy fix. You'd need new head gaskets and head bolts. The head bolts on the 3.0 are 'torque to yield' bolts which means they stretch when installed. This makes them hold stronger, but it also means they can't be reused, because they can only be stretched once. So, if you're confident that head gaskets are the only issue, you can clean off the mating surface for the heads, slap new gaskets on, and put it all back together with new head bolts.
The order of the pushrods and rocker arms shouldn't be critical. Just make sure you don't end up having extra parts when you're done, and tighten everything down to the correct specs.