While narrating the strength of Vali, Sugreeva says
समुद्रात् पश्चिमात् पूर्वम् दक्षिणाद् अपि च उत्तरम् | क्रामति अनुदिते
सूर्ये वाली व्यपगत क्लमः || ४-११-४
"Before the dawn of sun Vali unweariedly strides from western ocean to eastern, and even from southern to northern for offering
water oblations to the rising sun".
While arguing with Sri Rama, even at the death bed, Vali says
वयम् वनचरा राम मृगा मूल फल अशनाः | एषा प्रकृतिर् अस्माकम् पुरुषः त्वम्
नरेश्वरः || १-१७-३०
"We as animals live in forests while you are city dwellers, we live by
eating fruits and tubers while you enjoy feasts and banquets, our
nature is such to kill and get killed, thus you and me have no
correlation. And you, even if you are a man and a prince for humans,
you resorted to this animalistic way of killing me lying in the wait,
thus your action is worse than that of an animal, if not subhuman or
un-princely.
We have to remember that the same Vali speaks about good and bad, in the subsequent verses, indicating that he knows pretty well about Dharma. He was arguing with Sri Rama on the pretext of his animal nature, just to defend himself.
राजहा ब्रह्महा गोघ्नः चोरः प्राणिवधे रतः | नास्तिकः परिवेत्ता च सर्वे
निरय गामिनः || १-१७-३६
"A regicide, a Brahman-cide, a cow-slayer, a thief, an inveterate
killer, an atheist, and an younger brother who marries before his
elder, all of them will go to hell.
We should also remember that following Vedic rituals is different from being strict follower of Vedic injuctions. For that mattter, the demons in the kingdom of demon king Ravana, who was embodiment of adharma, did follow Vedic rituals.
षडङ्गवेदविदुषाम् क्रतुप्रवरयाजिनाम् | शुश्राव ब्रह्मघोषान् स विरात्रे
ब्रह्मरक्षसाम् || ५-१८-२
That Hanuma heard Vedic sounds early in the morning of Brahma
Rakshasas well versed in six parts of Vedas and those who performed
excellent sacrifices.