Banquo definitely serves as a foil to Macbeth in Shakespeare's Macbeth. Macbeth is predicted to become king, while Banquo is predicted to be the father of many kings. In other words, his heirs will be kings.
Macbeth embarks on a destructive run of murders in order to first be crowned kind, and then to hold on to the thrown. He is obsessed with ambition.
Banquo on the other hand finds the idea of having his heirs rule Scotland attractive, but does not take steps of any kind to make it happen. He is not obsessed by ambition.
Both face similar situations, but Banquo handles the situation as it should be handled, while Macbeth does not.
Yes, Banquo is a foil to Macbeth.
Macbeth seems to be very ambitious from the beginning of the play while Banquo is, comparatively, very rational and fair human being.
Macbeth trusts the witches blindly, but It is Banquo who, being present with Macbeth at the same place and time, and being prophesied that his heirs would be king, does not pay heed to them. He remains much indifferent to their oracles unlike Macbeth. This exposes his moderate feature too.
Macbeth wants to get the sole control over the throne. And all he wants is to keep his path smooth and secure. But the problem is that, it has been foretold by the witches - Banquo's children would be king in future, and thus Banquo himself would become "Lesser than Macbeth, and greater" and "Not so happy, yet much happier". So, definitely, Banquo is a threat to his ambition. Macbeth thinks that "To be thus is nothing,/ But to be safely thus" (3.1). For the sake of his holding on the throne, killing this foil named Banquo becomes a must for Macbeth. So, like Duncan, Banquo also becomes the target of his destructive greed and ambition. Macbeth remains a monstrous evil man; but in Banquo, we find no such characteristic.
Banquo serves as a foil to Macbeth, showing an alternate react to prophecy. Banquo retains his morals and allegiances, but ends up dying. He is brave and ambitious, but this is tempered by intelligence.