There is a scenario where the ball could stay on one side of the court for more than 24 seconds and go back to the offensive team at some point. It7s really unlikely and I don7t know how many times its even ever happened in recorded basketball if ever.
you see it quite often, with airballs at the buzzerbeater. If the team get the offensiv rebound it is an shot clock violation, else it is a reguar defensiv rebound. if the first attemp of the rebound is tip this may even take a bit time.
The same could happen with a tipped away ball during a pass, but the time the ball is lost is really to long to be plausible, but over 24s happens quite often. Don't know if NBA rules a different in this direction.