No, offside was the wrong decision.
An offside offence can only occur when a player is in an offside position at the time their teammate plays the ball. The only instance in this episode when a teammate played the ball was when De Bruyne was crossing it inside the box when Sané clearly wasn't in an offside position.
After this touch from De Bruyne no one else except Sané ever touched the ball from City side, so technically there couldn't be any other offside offences in which Sané could have been involved.
You're talking about this goal?
(Manchester City vs Liverpool, CL 2018 Quarter Final, 2nd leg, where Sané scored the 2-0, which didn't count.)
It was a legal goal, but pretty hard to see for the referee.
The first rule... was he even in an offside position? Yes, definitely.
When the keeper cleared the ball he passed Sané and there was only one defending player closer to the goal line than him. That's offside, because according to the Laws of the Game there need to be two opponents between him and the goal line. Usually the last defender and the goalkeeper are the ones that count, but the keeper was out of the goal in this situation and the 2nd last opponent counted (was still him, though), so there were no longer two opponents between Sané and the goal line.
A player is in an offside position if:
any part of the head, body or feet is in the opponents’ half (excluding the halfway line) and any part of the head, body or feet is nearer to the opponents’ goal line than both the ball and the second-last opponent.
Secondly, does the rebound count?
The other question is: Was the rebound an action where offside actually counts? The Laws are pretty clear in this case:
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:
I had to watch the replay a couple of times to check who actually gave Sané the ball, so it was probably hard to see for the match officials (the ref stood behind then and both moved towards the ball after the keeper saved it). Since the ball bounced off a defender and was never touched by a team mate there was no illegal offside position.