North Dakota birth registration law says that
If the mother of the child was not married at the time of conception
or birth, the child's surname shall be shown on the record as the
legal surname of the mother at the time of the birth unless otherwise
determined in a court paternity action, or unless an acknowledgment of
paternity signed by both parents is received stating the surname of
the child to be the legal surname of the mother or father.
There is no explicit statutory provision that assigns a child the same surname as that of its married parents who have the same surname.
This law is technically ambiguous since "at the time of conception or birth" refer to two distinctly different times, which implies that in case of a change of marital status, someone has to decide whether to follow the "mother's name" rule or... ah, but there is no other rule. The overriding provision involves the Acknowledgment of Paternity form (SFN 8195) which you can submit, which does not care if you are married, which is designed for this kind of case. There is a difference between the wording of the statute and what the state form says, since the form lets you fill in for the child
Name as you want it on the birth certificate (first, middle, last)
which does not say "last name must be the last name of one of the parents". The instructions on the back side of the form do not contradict this freedom of naming. Bear in mind that the hospital is the intermediary between the parents and the Division of Vital Record, and they are not particularly likely to have a legal agenda. You may independently want to fill in this form, to get a legal acknowledgement of paternity on the record.
The Dept. of Health says that the form "must show the child’s name and the mother's name as they appear on the birth record", which suggests that this form cannot be submitted at the time of birth (as it can be in some other states). Incidentally, you have to use an official state-supplied form, the linked for is purely informational. However, these guys say that hospitals / birthing centers usually have the AOP and can help you fill it in, implying that you do not have to wait for an initial birth certificate to be issued.
You can delay the acknowledgement of paternity. There is a 1 year cutoff for correcting birth records, but this requires both parents on the birth certificate to agree to the correction (you see the catch, I assume: you both have to be on the birth certificate).