Well after seeing this a million times, it's a good hit. If you put your pointer at 19seconds and let the shot play out then hit 19seconds again and let shot play out. You'll see the cueball slightly grazes the 3 ball before hitting the rail.Is this the foul in question?
I don't see the cue ball move back to the rail after contacting the 3 but if it's in contact with both I believe it's legal.
Took me quite a few times replaying it back to find a good spot to keep your eyes at in order to see the 3 move before cueball hits rail.