What I mean is if Robb did everything as he does in the books/show but doesn’t marry Talissa/Jeyne would it have actually changed the outcome.
Walder Frey is shown to be a cautious man and when he could tell that the war was shifting in favour of the Lannisters with the Karstarks abandoning Robb, losing Jamie, the iron born attacking and the formation of the Lannister/ Tyrell alliance. If Tywin or Roose still approached him with the idea of betrayal then he probably would still have agreed.
If he doesn’t have quibbles over killing his own guests and his king, and doesn’t care about Catlyn killing his wife/son then would it really make a difference that the king he’s killing is his son in law?
I can imagine that when Robb comes back to the Twins, Walder simply demands that he weds his daughter then and there at the twins in case anything would happen to him in the war and then the red wedding just happens as it did anyway.
Roose Bolton would still have betrayed him and Walder would have seen the tide turning against him, Robb breaking his oath was really just a convenient pretence that the Freys could use to justify they’re actions.
Edit: To clarify I don’t necessarily mean killing Robb but perhaps taking him captive like he did Edmure