In a marriage, yes.
Do you have a Bible?
If so, look this up: 1 Corinthians 7:3-5
3 The husband should fulfill his marital duty to his wife, and likewise the wife to her husband.God told Joseph to go on with his marriage plans with Mary.
4 The wife does not have authority over her own body but yields it to her husband. In the same way, the husband does not have authority over his own body but yields it to his wife.
5 Do not deprive each other except perhaps by mutual consent and for a time, so that you may devote yourselves to prayer. Then come together again so that Satan will not tempt you because of your lack of self-control. (NIV)
He also told him to wait until her pregnancy was over before having sex with her.
God's rules must be obeyed by married couples, or else it is a sin.
If Mary didn't have sex with her husband, it would have been a sin.
She was a very obedient handmaiden of the lord so would obey God.
You should study the Bible, it would help you answer many questions. Not that I mind teaching you scriptural Truths!
and at the end it says I am not imposing a rule on you....