Correct use of "rid of"
Solution 1:
Both your examples should be get rid of: I suspect a typo. There is a construction need rid of something, short for need to be rid of; but it's almost entirely obsolete.
And you can rid something of something else, or free it (not 'dispose it') of whatever; rid the dog of fleas, for example, or rid the car of the annoying noise. Get rid of was originally a subset of this, something like get yourself rid of the infection. But it has pretty much taken over: I wouldn't advise a non-native speaker to use anything except get rid of.
Solution 2:
Rid is one of those English Zero-inflected monosyllabic verbs ending in -d or -t; i.e, it uses -Ø ("Zero") as the suffix for both Past and Perfect forms -- its principal parts are rid, rid, rid
(compare see, saw, seen).
Other verbs in this category include hit, hit, hit; bid, bid, bid; bet, bet, bet; burst, burst, burst; cost, cost, cost; and fit, fit, fit (though only intransitive fit: Those have never fit me properly ~ *We have never fit them together properly).
As pointed out, one can say A rid X of Y, which is the transitive causative use of rid; the passive of this construction is X was rid of Y by A (past tense because present tense would have been A rids X of Y). And, given the meaning of rid, that passive transmutes easily into a predicate adjective as a resultant state: X is (now) rid of Y.
Every changeable state has an inchoative construction, meaning 'to change into' that state, and the most common construction for that in English uses get, in its sense of come to be (whence become) -- get is troublesome in English because it forms the inchoative of both have and be, but we won't consider its come to have sense here.
So, the upshot is that get rid of has become an idiomatic causative/inchoative form with its own life; the string rid of by itself is not a constituent, it's part of be rid of and get rid of, which are constituents, but rid and of never occur together as a unit in sentences She rid the castle of ghosts.
Executive summary: Don't think of grammar as words or strings; it's Constructions and Constituents that matter.