The basic dispute is as you stated it:
The Torah’s words "
lo tikrav legalot ervata" (Leviticus 18:19) mean that sexual relations with a
niddah are forbidden and punishable by
karet (excision).
The
Rambam states that a prohibition on hugging and kissing, and on touching that brings sexual pleasure, is also derived from the words
‘lo tikrav’ and is
d’oraita (although not punished by
karet). The
Ramban states that only intercourse itself is forbidden by Torah law, while any other affectionate touching is forbidden by rabbinic decree. Most, but not all,
rishonim (medieval authorities) rule in accordance with the Rambam, and the
acharonim (later authorities) agree that the prohibition against touching is considered at least a
safek d’oraita (a possible Torah prohibition). This question is discussed in the context of taking care of a sick spouse, and in modern times in the context of socially expected contact such as a handshaking.
There are three approaches to explaining the Rambam:
Any bodily contact at all is prohibited by ‘lo tikrav.’
Only affectionate contact is forbidden.
Only contact which typically precedes sexual intercourse, such as hugging and kissing or other foreplay, is a Torah prohibition, but any contact at all between a husband and his wife during niddah is rabbinically forbidden.