When two defenders (opponents) are playing the ball between each other and it then deflects off one of them to an attacker in an offside position. If the attacker then take possession of the ball, is that an offside offence?
No - Being passed by an opponent is not an offside offence.
Law 11 Offside.
... A player in an offside position receiving the ball from an opponent who deliberately plays the ball (except from a deliberate save by any opponent) is not considered to have gained an advantage (hence not being offside).