Many languages have possessive suffixes. There's some kind of semantic similarity between being a recipient or indirect object and being a possessor. These could easily be marked in similar ways on an NP - i.e. the recipient could be marked on the object, the possessor on any NP.
The grammaticalization path here might be pretty obvious: indirect object pronouns get fused to the direct object noun, and turn into affixes. Trivial, no?
An obvious result could be identical markers, so
I gave (away?) your car = I gave you the car
The other possibility of course distinguishes the two, although we can of course limit the amount of distinctions made - maybe indirect object markers cannot be reflexive, and the second person plural conflates indirect object and possessor, or whatever.
Now we can start doing fun things - if our markers are distinct, they're also case markers – their presence indicates that an NP is a direct object. Now, we could imagine a double marking here, where both possessive and IO markers can appear simultaneously on a noun, turning
I gave away your car ≠ I gave you the car
Now, this could be sort of different from case marking, though, when interacting with passivization! For passive verbs, maybe this marking remains whenever the direct object is made subject, but disappears when the indirect object is made subject.