Our Gemara examines the case of someone who is noder ba-Torah – he makes a vow in the name of the Torah – which is not considered to be a vow. If, however, his vow is made on “what is written in the Torah,” then his vow is accepted as a legitimate one.
The Ra’avad accepts this Gemara at face value and understands that the discussion is about a neder that is expressed in language that forbids something “the way the Torah is forbidden.” Most commentaries (the Rosh and the Ran, for example) argue that the discussion in this case is really about shevuot rather than nedarim. Their argument is that the Torah is not forbidden, so such a vow would make no sense. What we have here is an example of someone who is saying “I swear by the Torah” or “I swear by what is written in the Torah.”
In a case where a person makes his vow or takes his oath by saying “in the Torah and what is written in it” the Gemara teaches that there is still room to distinguish between a situation where a person is understood to be referring to the physical scroll itself, and where he is referring to the azkarot – the names of God – that are written in it.
Here, too, the Ra’avad understands that the person is making a vow in which he compares an object to the names of God that are written in the Torah. Just like the ink is turned into something that is holy – and forbidden – by the act of writing, similarly the object that I am forbidding by means of my vow will become prohibited to me.
Most of the other rishonim disagree, arguing that all of the words written in the Torah are considered to have kedushah – holiness – attached to them, and there is no need to specify that it is the azkarot that are being referred to in the vow. Furthermore, the Rashba points out that once written upon, the parchment that makes up the scroll of the Torah is kadosh, as well.
Although the Rashba does suggest that the Ra’avad’s intention may be that the parchment does not have inherent kedushah, rather that its holiness only derives from the words written on it, the approach of the rishonim in general is to understand that our Gemara is discussing a shevua – an oath – and that the reference to azkarot means that the person is swearing in God’s name, which would certainly create a legitimate oath that must be kept.