Unless they were wealthy, divorce is unlikely, as that would require an action in the Court of Session. If you lived outside Edinburgh you would require to instruct a local solicitor to instruct an Edinburgh solicitor who would then instruct an advocate. Sixty years before Legal Aid, that was pretty expensive.
As there was a child, you can also rule out annulment on the grounds of non-consummation, so I rather think somebody wasn't entirely honest when they presented the banns for the second marriage. was it in the same parish as the first?