The Machaneh Ephraim (Shluchin 19) quotes a machlokes mentioned in the Tur (c.m. 184). The Ramah holds that Shimon was serving as Reuven's agent and is not believed to say he purchased it for himself. But the Rashba in a teshuva writes that when 2 people agree that they will split profits of their business equally, on partner is not believed to say that he had intended to break the partnership and all the profits that he earned are his own, unless there was a formal declaration made in the presence of witnesses that he broke the partnership. The Rashba proves this from our gemara where the worker saved the possessions of his employer, and so long as he didn't retract on his status as a worker, we assume that he was doing it on behalf of the employer and not on behalf of himself. The machaneh ephraim understands from the rashbah that who bases his ruling on our gemara that refers specifically to a worker, that only a paid worker is not able to break his employment agreement without a formal declaration. But this implies that one who is not a paid worker can claim at any moment that he retracted from his original commitment. Based on this, the Ramah would say that the lottery ticket belongs to Reuven, but the Rashba will say that Shimon is believed to say that he retracted and keep the ticket for himself.