I think '05/'06 started getting AUX inputs.
1998-2012 are same generation so should fit, wiring harness is often the same, but some Rangers got a "Premium" sound system which had a separate AMP.
Look here on that: Ford Ranger Radio Wiring Diagram
There are inexpensive devices that can be used with your current radio.
The FM radio band will have "open" frequencies in your area
This means you can broadcast music on an "open" frequency at low power and then tune that music in on the Trucks FM tuner so you hear it just like tuning in an FM radio station.
These can be battery powered or wired to use vehicle power(cigarette lighter plug) and just plug into the head phone jack on phone or MP3 player.
There are also combo units that have the same FM transmitter and also Bluetooth so no wires, these usually plug into cigarette lighter port for power.
Same setup, you tune the unit to unused FM frequency, then connect to it via bluetooth.
When you tune truck radio to that FM channel you can listen to the music.
But just as a heads up using Bluetooth to play music does use phone's battery power pretty fast, so if you get one of these units get one with USB plug in so you can charge the phone if needed
Google: car fm transmitter bluetooth
And if using a phone to play music then these setups also work as handsfree for the phone, you can answer a call and hear caller thru the speakers they hear you thru the mic on the phone