In Gary Paulsen's The River, Brian is left to paddle a raft by himself, believing it's the only option after Derek is struck by lightning. Amidst hallucinations that are likely due to a lack of sleep and the stress he's under, Brian begins to think that he could paddle faster and make more progress if he were to push Derek off the raft. Such a move would essentially kill Derek but could give him his best chance of surviving.
Brian tries to rationalize this thought by telling himself that Derek is at fault for the situation. After all, Derek was the one who got struck by lightning because he stood up in the middle of a storm rather than trying to take cover. However, Brian is soon able to push back against the thought of pushing Derek into the water. At one point, he goes so far as to yell at himself for having such a thought and convince himself that doing so would be wrong.
Ultimately, Brian recognizes that his stress and exhaustion, not to mention sleep deprivation and hallucinations, brought about his thoughts of betraying Derek. By the next morning, his hallucinations are gone, allowing Brian to push away any thought of abandoning Derek. However, he has a new set of problems: he realizes that the lake they have reached is not on the map.