If you leave and try to come back, you still have to convince the border control that you are just visiting. If they have some reason to think that you are lying to them or that you are a risk of overstaying, they can deny you entry. Some people have been told to not try to enter again for a period of time, some have been told to come back with a letter from an employer in the US etc.
What you should do about it depends on if you get denied and what they tell you when they do it. Some people have been red-flagged in the system when trying to re-enter at a different border station shortly after they were denied at another and without doing/bringing what they were told to.
Strictly speaking, it would be against the law for your girlfriend to go to the US as a visitor intending to get married. Strictly speaking, she should apply for a fiance visa but if she doesn't show up at the border in a wedding dress, she will most likely get away with it.
If you did get married, the marriage in itself would not give you any special rights to go to Canada but your wife could then sponsor you for permanent residency and that would give you the right to live and work in Canada.