I was wondering whether it is possible to follow Dharmashastras partially. Is there such provision in Dharmashastras? Or do Dharmashastras categorically say that you have to follow it in its entirety?
Yes they do have provisions to accept only partial/logical parts and remove rest.
- A man "is said to be conversant with duty, who knows duty as depending on all four foundations". These four foundations of duty are (1) as laid down in the Vedas, (2) as laid down in the Smritis, (3) as sanctioned by ancient usage and customs and (4) as approved by the heart or one's own conscience.(Bhishma in MB Shanti Parva 132)
- If a man explores, by ratiocination, the Vedic teaching regarding Dharma, he alone, and no other, understands Dharma(Manu 12.106)
- Scriptures are no scriptures if they cannot stand the test of reason.(MB Santi CXLII)
- The remark of a child is to be accepted, if it is in accordance with reason; but the remark of even Brahma Himself, the creator of the world is to be rejected like a piece of straw if it does not accord with reason(Yoga Vasistha 2.18)
- That which has been laid down by the forefathers or decreed by a Ruler and is followed by a whole community of men, is the Law of Man. Being man-made and imperfect, it shall be followed by the wise with wisdom and not blindly.(Shiv Rahasya 11.2)
- One should practice what one considers to be one’s duty, guided by reasons, instead of blindly following the practices of the world. (MB Santi CCLXII)
- If a holy act is against the interest of other members of the society, it should not be practiced. It is Dharma which is the source of Artha and even of Kama. (Kurma Purana 1.2.54)
- Let him avoid the acquisition of wealth and the gratification of his desires, if they are opposed to the sacred law, and even lawful acts which may cause pain in the future or are offensive to men. (Manu Smriti 4.176)
- The Shruti, the Smriti, the conduct of good men, what appears pleasant to one's own self, and the desire which springs from a good resolution, are said to be the roots of Dharma. (Yajnavalkya 1.7)
- Wealth and Pleasure, opposed to Righteousness he shall avoid; also such Righteousness as may be disapproved by the people.’(Viṣṇu 71.84.85)
- He shall enjoy such pleasures as are not incompatible with righteousness(Āpastamba 7.20.22)
- One should never do that to another which one regards as injurious to one’s own self. This, in brief, is the rule of dharma. Other behavior is due to selfish desires.( Brihaspati, Mahabharata 13.114.8)
- If the entire Dharma can be said in a few words, then it is—that which is unfavorable to us, do not do that to others.(Padmapuraana,Shrushti 19/357–358)
- One who judges pleasure or pain everywhere by the same standard as one applies to oneself, that yogī, O Arjuna, is regarded as the highest.’(Gita 6.32)
Sethu Srivatsa Koduru made an almost exhaustive list in support of the view that Smritis can be followed partially. I just want to add one more verse from Yajnavalkya Smriti.
Let him diligently follow the law (Dharma) with deed, mind and speech. But let him not follow (an ordinance) which, though lawful, is yet not conducive to heaven and is offensive to the people. - Yajnavalkya I.156 [Yajnavalkya Smriti translated by Srisa Chandra Vidyarnava]
One should perform religious rites carefully by deeds, mind and words; one should not perform a religious rite, which is censured by the people and which does not lead to the celestial region [even if it is sanctioned in the scriptures]. - Yajnavalkya I.156 [Yajnavalkya Smriti translated by Manmatha Nath Dutt]
Thus, clearly, Smriti itself says that one may choose to not follow some part of it. That means it can be followed partially. And in some situations, it should be followed partially.