Starting from the Purusha Sukta - there is the birth-based four-fold division of humanity - Brahmins,kshatriyas,Vaishyas and Sudras.
https://hinduism.stackexchange.com/a/52131/12489
refers to an explicit rejection of birth-based caste
Not by birth are the Brahmana, Kshatriya, Vaisya, Sudra and Mlechchha separated, but by virtues and works. - Sukra Niti (Sukracharya's system of morals) 1.75-76
but the basic four-caste framework is maintained - either by birth or by qualities.
The Tamil moralist and poet Auvaiyar rejected the four-fold classification completely:
She states that human beings can be divided only into two divisions, high and low, depending upon how much they are willing to share their fortunes with others.
சாதி இரண்டொழிய வேறில்லை சாற்றுங்கால் நீதிவழுவா நெறிமுறையின் - மேதினியில் இட்டார் பெரியோர் இடாதார் இழிகுலத்தோர் பட்டாங்கி லுள்ள படி
Are there similar heterodox classifications in canonical Sanskrit works?