In real pool rules, that is a win, if you call your pocket, and make a legal hit on the ball, whatever happens in between does not matter as long as it's legal. So you can't of-course call the ball, hit it and then grab your cue and guide the ball in with your shaft LOL
But you can play your ball off another players ball as long as you hit your ball with the cueball first (legal hit). In fact you can hit every ball on the table and go 3 rails with the object ball, but as long as it goes into the called pocket, it counts as a good shot.
Many people though don't know the real rules and play by "house" or "bar" rules, in those rules you may or may not be able to hit another ball. But since those rules are not official at all and vary from place to place and from player to player, going by the official rules makes things a lot easier. I mean how do you know what the other player thinks will be a legal hit or shot if 10 people think 5 different things about the rules? The official rules are not guesses and are easily available online.
Now if you had a last solid and made the shot but then hit the 8 by accident and that went in, that is a loss even though you made a legal shot on your ball. Early made 8 ball is a loss in every rule set I have seen.