This just happened in our soccer game. A defender gets possession of the ball and attempts to clear it out of the penalty box but it deflects off an opponent, who is onside and goes straight to another opponent who is standing in an offside position. Is this player offside?
Yes, this player is offside.
See Law 11 - Offside Offence of the IFAB Laws of the Game (emphasis mine):
A player in an offside position at the moment the ball is played or touched by a team-mate is only penalised on becoming involved in active play by [...]
He would be onside if the ball was played directly to him by the defender.