This situation is described in the case book (6.4.5 situation B). The ruling is "Since the throw -in had not ended and no violation occurred, it is still A's ball for an alternating-possession throw in. (4-42-5).
Rule 4-42-5 "The throw-in ends when the PASSED ball touches, or is touched by, another player who is either inbounds or out of bounds."
What you were told is correct