To really know for sure what the problem is, you need to pull the code from the computer directly. Places like autozone will not be able to do this, as their scanners are only generic and pull CEL codes. On the other hand, places like pepboys will want 100 dollars JUST to hook it up to their fancy scan tools, which is a total ripoff, and forget if you need to scan it more than once if the code changes.
So, what's a cheap and easy way to pull codes from a Ford? Forscan. If you head over to forscan.org you can get a free version of the scan software for windows machines to which it can be installed onto a laptop. However there do exist other, not free, versions of the software for different devices.
Next you're going to need a way to connect the laptop to the vehicle. You need an OBDII to USB, ELM327. These can be had off ebay for around 12 dollars, and it pays for itself the first time you use it. It can read any and all codes you could ever have on the Ranger, 1996 to 2011 and on other ford products 1996 to current year (2016).
With that hooked up, it will tell you the code and give you a description, as well as a brief list of possible problem areas which could cause it. Having the actual code from the software itself will help greatly.