In addition to the options mentioned by Adarain and Jan, various reflexives and reflexive-like operations can often be of use in dealing with such situations. English already has some reflexives, providing some amount of disambiguation, Danish goes a little further has a compulsory reflexive/non-reflexive distinction in 3rd person possessives, and while the specific example you mentioned doesn't work well in translation, a similarly problematic sentence "Adam sent James his essay" can be easily somewhat disambiguated with this system:
Adami sendte Jamesj sini stil
Adami sendte Jamesj hansj(/k) stil
It is possible for reflexive systems to be significantly more broad than this, rather than just referring to antecedents in the same clause, even if it's omitted via some other rule, e.g. in "Jonh saw Adam and shot himself in the foot", where there is no overt reference to John in the second clause, because it's been omitted due to subject coreference (such deletion rules, when constraints are put on them is actually another way of reducing ambiguity, I have relatively recently written a rather long forum post on this which goes into much more detail about them), it's possible to have "long-distance reflexives" which take antecedents outside of the clause.
In Mandarin, the reflexive ziji can refer to both local and non-local antecedents in some cases:
Zhangsan renwei Lisi kan-bu-qi ziji
Zhangsan think Lisi look-not-up REFL
"Zhangsani thinks Lisij looks down on selfi/j"
Certain things block this though, for example shifts in perspective:
Zhangsan renwei wo zhidao Wangwu xihuan ziji
Zhangsan think I know Wangwu like REFL
"Zhangsani thinks Ij know Wangwuk likes self*i/*j/k"
In Igbo, in complements of communication, entities that are coreferential with the source of information are marked by what is known as "logophoric pronouns":
ọ́ sị̀rị̀ nà ọ́ byàrà
he said that he came
"hei said that hej came"
ọ́ sị̀rị̀ nà yá byàrà
he said that LOG came
"hei said that hei came"
Gokana also has such a system, though the marking is on the verb, though the constraints on what can be coreferential are quite free:
aè kɔ aè dɔ
he said he fell
"hei said that hej fell"
aè kɔ aè dɔ-ɛ
he said he fell-LOG
"hei said that hei fell"
aè kɔ oò div-èè e
he said you hit-LOG him
"hei said that you hit himi
aè kɔ oò ziv-èè a gĩ́ã́
he said you stole-LOG his yams
"hei said that you stole hisi yams"
The wikipedia article on logophoricity goes into more depth.
It is also possible to have two different reflexives, requiring respectively local and non-local antecedents. Danish has a rather limited case of this in bare complements to perception verbs, where the two reflexives sig and sig selv which are usually either only different in level of emphasis or in complementary distribution, respectively require non-local and local antecedents:
Holger hørte Peter tale om sig.
"Holgeri heard Peterj talking about himi."
Holger hørte Peter tale om sig selv.
"Holgeri heard Peterj talking about himselfj."
Holger hørte Peter tale om ham.
"Holgeri heard Peterj talking about himk."
"4th Person systems" such as seen Eskimo languages are rather similar, though more general as they are used in all subordinate clauses are also another type of reflexive-like construction (the "fourth" person is often labeled 3R) and they are also used intraclausally in possessive marking. In all of these cases they mark that a participant or possessor is coreferential with the subject of the main clause (which is defined in terms of S/A despite the case marking being ergative). An example from Siberian Yupik:
"when hei saw himj, hek was happy"
"when hei saw himj, hei was happy"
"when hei saw himj, hej was happy"
In addition to all these various reflexive constructions, switch reference, the overt marking of whether the "subject" is either the same or different, either between two coordinate clauses, or a subordinate and main clause can also resolve some ambiguity. Take for example this pair of sentences from Hua:
"hei hit himj and hei ran away"
"hei hit himj and hej ran away"
Switch reference can only deal with one set of coreference though what exactly is tracked varies. In some languages, it is specifically the actor that is tracked, while others may track the topic or some other pragmatically prominent NP, or may even differ in what is tracked in the controlling clause as opposed to the clause recieving the marking. Additionally the marking may occasionally also be sensitive to changes in things like time, place, discourse coherency and/or reality status, and as a result, switch reference may fulfill may other roles than simply dealing with ambiguity. This paper, particularly chapters 5 and 6, goes into quite a bit of detail about the highly varied and interesting usage of switch-ref in Papua New Guinean languages.