
Cooperating can also be rational, if you consider an iterated (repeated) case of this problem. Then defecting will (usually) be punished by the other player and cooperating would be the best choice for both players (and defecting to correct/punish the opponent). That's probably a more real-world situation.
But in this case, I would be more careful and defect by default (unless I trust my opponent).