I do not know if the seller can deal with the 2nd bank without going through the primary bank, but I do know, at least where I leave, that the buyer cannot do this for the seller. At the time of closing, the buyer has to sign a disclaimer stating that they have not done anything like that (i.e. they did not provide any money to the seller other than the sale price stated in the contract).
In other words, what you put in the example, is considered cheating. The seller is going behind the primary bank , offering more money (in fact, to the seller because the money is used for the seller to settle with the 2nd bank). Whatever the buyer offers, should have to go through the primary bank. Otherwise, it is considered illegal at where I live.