1997 Ranger still has the Fuel Pressure Regulator(FPR) and return line to the fuel tank.
The FPR is on the fuel rail, it has a vacuum line attached.
Remove vacuum line and check it for gas smell or gas, if found replace FPR.
Does it idle at 700rpms when warmed up?
What is the exhaust pressure like?
When you rev the engine does the exhaust pressure at the tail pipe match the RPM, a partially clogged exhaust can cause bogging.
EGR valve opening early can cause bogging.
If possible use a vacuum gauge on the intake, it can tell you alot about engine condition.
i.e. vacuum leaks, clogged exhaust, rings, valves, ect......
Technical Articles: Engine testing with a Vacuum Gauge - at Greg's Engine & Machine