What is the difference between the two? Would the following sentence work with "get rid of"?
We need to rid the world of hunger.
There is a grammatical difference between how you use the two.
When you use the verb to rid, you use it with an object (in your example the world). This is followed by the prepositional phrase of hunger. In this sentence, the object represents the place that you want to see cleaned.
On the other hand, to get rid of just has the of hunger without the direct object. You can often express the same meaning by adding the place after: "We need to get rid of hunger in the world".
"We need to get the world rid of hunger" almost works for me
If the world is a direct object then it should follow the verb. In get rid of the verb is get.