It looked like a foul on first glance, based on the angle the CB comes off the rail. But I screen recorded it and blew it up and slow motioned it. The 4b moves before the CB hits the rail IMO. I think the CB thins the 4b on the way in and then hit it again on the way out, causing the CB to react like that.
Stepping through the frames, there is one where the cue ball is about the same distance from the rail as the 4 ball. In that frame, it looks to me like the 4 has not moved. In the following frame, the 4 has moved, but I think the cue ball has already hit the cushion and is moving to the right.
On that kind of shot, it is always possible that the cue ball just barely brushed the ball going in and fair/foul shots will look the same.
I think it's not possible to call the shot from the video.