Is it necessary that the birth of an Avatara can only take place in some specific clans/castes only? For example, Sri Rama, Krishna were both born in Kshatriya families. Can an Avatara be born in a Vaishya or a Sudra family as well?
Yes:
What are some key features of an (human) Avatara of God?
From this commentary which seems to be referring to Vishnu Purana 6.5.74 as Parāśara Muni is the author of the Vishnu Purana:
The Sanskrit word bhagavān is explained by the great authority Parāśara Muni, the father of Vyāsadeva. The Supreme Personality who possesses all riches, all strength, all fame, all beauty, all knowledge and all renunciation is called Bhagavān. There are many persons who are very rich, very powerful, very beautiful, very famous, very learned and very much detached, but no one can claim that he possesses all riches, all strength, etc., entirely.
And from this commentary, the personality who has one or more of the above mentioned quality is known as Avtara. For example,
Dattātreya, Matsya, Kumāra and Kapila exhibited His transcendental knowledge.
Nara and Nārāyaṇa Ṛṣis exhibited His renunciation.
Balarāma, Mohinī and Vāmana exhibited His beauty.
From this answer,
the group of six qualities is said to exist in Nrisimha, Rama and Krishna.
As per SRI RAMAKRISHNA: THE GREAT MASTER by SWAMI SARADANANDA: PART FOUR: CHAPTER 3:
No inference or reasoning is necessary to explain that the lives of incarnations are not like those of ordinary men. Seeing in them the manifestation of unthinkable, unimaginable power, men’s heads are bent down in reverence to them; they offer their heart-felt worship and take refuge in them.
The Philosophers of India, like the great Rishi Kapila and other geniuses, made the utmost effort to pierce the mystery of the lives of those extraordinary, powerful personages. Trying to ascertain what led to such a vastly greater manifestation of power in them than in ordinary people, they saw at the very outset that the law of Karma, common to all, was quite inappropriate to solve the mystery.
For, it is in search of their own selfish pleasures that ordinary people perform good and bad actions. But, when the actions of those other persons are studied, that motive is seen to have been absolutely lacking.
The desire to remove the misery of others produced in them an irresistible effort therefor and at the altar of that desire they completely sacrificed all their own enjoyment and pleasures.
Again, it was also seen that the quest for honour, for name and fame in the world, never nourished the root of that desire.
For, it was always their habit to give up in all respects the desire to attain higher worlds and worldly honour, which they shunned as they would the droppings of crows.
Do you not see that the two Rishis, Nara and Narayana, spent ages in practising austerity in the hermitage of Badarika, in order to ascertain the means to do good to humanity? Ramachandra banished even Sita, dear to Him as His life, so that His subjects might be happy. Krishna performed each action of His with a view to establishing truth and religion. Buddha renounced the wealth of a king so that he might deliver men from the pain arising from birth, old age, death, etc. Jesus gave up His life on the cross, so that the kingdom of Heaven might come down to this world of grief and misery, that the realm of love of the Father in Heaven, who was Love Itself, might prevail over hatred, jealousy and bloodshed. It was against irreligion that Mohammad took up the sword. Sankara applied all his powers to explain to men that true peace consisted in the realization of non-duality. And, knowing that all the power conducive to the good of men lay in the name of Hari alone, Chaitanya renounced worldly pleasures and enjoyment and dedicated his life to the preaching of the name of Hari through loud singing and unrestrained dancing. What selfishness impelled them to perform all those actions, what pleasure attracted them to undergo such sufferings?
The signs spoken of in the scriptures and admitted to be produced in the bodies of persons liberated-in-life, owing to extraordinary feelings experienced by them, were, the philosophers found, clearly manifested in the lives of incarnations too. They were, therefore, forced to regard them as belonging to a new class. Kapila, the author of the Sankhya, said that they had in their minds a kind of very generous desire to do good to humanity. Therefore, though already liberated through the power of austerity practised in their past lives, they did not dwell in the state of Nirvana, infinite Bliss. They merged in Prakriti; in other words, they spent the period of a cycle, knowing that all the powers of Prakriti were theirs. And, therefore, that one among that class who knew himself possessed of such powers in any particular cycle, appeared to the people in general to be Isvara during that period.
For, any one who knew all the powers of Prakriti as his, would be able to apply or withdraw those powers at will. Just as we can use all the powers of Prakriti that exist in our limited bodies and minds only because we know them as ours, so can they use all its powers at will inasmuch as they know them as belonging to themselves.
Although Kapila does not admit the existence of an eternal Isvara, he has admitted the existence of all-powerful persons each of whom exists for a cycle, and called them Prakriti-lina Purushas, i.e., persons merged in Prakriti.
Again, seeing a higher and a lower manifestation of power in these persons and observing that the actions of some of them are performed for the permanent good of all the people of the whole world and those of others for the people of one country or a part of it only, the authors of the Vedanta have recognized the former as incarnations of God and the latter as eternally free Isvarakotis endowed with less authority.
With this opinion of the authors of the Vedanta as the basis, the authors of the Puranas afterwards came forward in their effort to ascertain, with the help of imagination, how large a part of God each one of the incarnations was, and made a little too much of their business of calculation: the author of the Bhagavata wrote such verses as, “These are one-sixteenth or smaller parts of the all-pervading One, but Krishna is the divine Lord Himself.”
The bodies and the minds of Adhikarika persons are seen to be made of such stuff as enables them to hold and retain the divine love and devotion and to manifest the powers of higher planes, quite naturally and without any sense of elation. The Jiva becomes egoistic and is beside himself with joy when he gets a little of spiritual power and respect from people. But the Adhikarika persons do not get at all unsettled or have their power of discrimination destroyed or become egoistic, even if they get those powers a thousandfold.
The Jiva never likes to return to the world for any reason whatever if, being free from all kinds of bondage, he can somehow attain, in Samadhi, the knowledge of the Self. But as soon as the Adhikarika persons feel this bliss, there arises in their minds the question how they can share it with others.
After the realization of God the Jiva has no duty whatever left. But it is only after that realization that the Adhikarika persons grasp and understand the especial purpose for which they were born and begin to accomplish it.
Therefore, the law regarding Adhikarika persons is that, until they execute the specific mission for which they are born, there never arises in their minds, as does in the mind of ordinary, liberated persons, the attitude that if the body is to drop, it might well be allowed to drop without any harm; but, rather, there is seen in them an eagerness to live in this sphere of the mortals.
But there is, it is seen, a tremendous difference between the will to live of the incarnations and that of the Jivas. Moreover, the Adhikarika persons know when it is that their mission has been executed and delightfully give up their bodies in Samadhi without remaining for a second more in the world. A Jiva cannot even know when the duties of his life would come to an end, let alone the power of giving up his body at will in Samadhi. Rather, he feels that many desires remain unfulfilled in this life of his.
There are similar differences between them in all other respects also. Therefore we shall be falling into a great error if we try to judge the purpose and actions of the lives of incarnations by our own standard.
Related Post(s)
What does the term "Adhikarika Purusha" mean?
What are the various 'kalas' of Lord Vishnu?
Anshavatar and Purnavatar - are there different types of avatars?
Which scriptures deals about avataras and kalas?
Which scripture describes six kalyana gunas (auspicious attributes) of Vishnu?