In 34th verse in 109 sarga of ayodhya kanda in valmiki Ramayana, the words यथा हि चोरः स तथा हि बुद्ध | appear. My question here is how did Buddha come to be referenced in Treta yuga?
First of all, this translation translates the word buddah in the literal meaning of intellection, rather than the name of the founder of Buddhism:
It is an exact state of the case that a mere intellection deserves to be punished as it were a thief and know an atheist to be on par with a mere intellectual. Therefore he is the most suspectable and should be punished in the interest of the people. In no case should a wise man consort with an atheist.
Second of all, Buddha got refer to the previous Buddha incarnation that Vishnu took to lead the Asuras astray in Tripura, rather than to Vishnu's incarnation as Siddhartha Gautama. The story of Tripura happened before the Ramayana.
In any case, many scholars do think this reference to Buddhism is an anachronism and that this passage is an interpolation; here's what Gaurinath Shastri says on page 29 of this book:
Traces of Buddhism cannot be found in the Ramayana and the solitary where the Buddha is mentioned is believed to be an interpolation.
No. The verse you mention is not present in the Critical Edition (CE) of Vālmīki Rāmāyaṇa. Therefore it's safe to say it's an interpolation. In fact, verses 30-39 of Sarga 109 of the version available at valmikiramayan.net has been excised from the CE.
Translation of the sarga in which Rāma responds to Jābāli's arguments – from the Debroy translation based on the CE – is shown below. As you can see, Rāma doesn't rebuke Jābāli in the slightest.
Chapter 2 (Ayodhya Kanda) – Sarga 101
Rama, supreme among those who have truth in their souls, heard Jabali's words. Without any disturbance to his own intelligence, he spoke these excellent words. 'You have spoken these words with a view to ensuring my pleasure. Though it seems to be a possible course of action, it is actually impossible. Though it seems to be sanctioned food, it is actually food that should not be eaten. If a man is full of evil conduct and violates pledges, he does not receive respect from the virtuous and destroys perceptions about his character. Conduct makes it evident whether a person is noble or ignoble, brave or vain, pure or impure. If I am ignoble but appear noble, devoid of purity but appear pure, bereft of signs but seem to possess signs, practise bad conduct in the garb of good conduct, practise adharma dressed up as dharma, create confusion in this world, abandon everything auspicious and forsake rites and rituals, will any man who can distinguish between what should be done and what should not be done show me great respect in this world? I will be censured by the world as someone who is wicked in conduct. If I follow bad policies, how can I expect good conduct from anyone? If I deviate from pledges, how will I obtain heaven? The entire world will then conduct itself as it wills.
Whatever is the conduct followed by kings, that is indeed the conduct followed by the subjects. Truth and non-violence are the eternal conduct of kings. Therefore, there must be truth in the soul of the kingdom. The world is established in truth. The rishis and the gods also revere truth. A person who speaks truth in this world obtains what is supreme after death. A man who practises falsehood is feared like a snake. In this world, truth is supreme dharma. It is said to be the foundation for heaven. Truth is the lord of this world. Padma is established in truth. Truth is the foundation of everything. There is no objective that is superior to truth. Donations, sacrifices, oblations, tormenting through austerities and the Vedas all these are established in truth. Therefore, there is nothing superior to truth. A single person can rule over the world. A single person can protect the lineage. A single person can immerse it in hell. A single person can obtain greatness in heaven. For what purpose should I not follow the instructions of my father? I am true to pledges. He was truthful and he made a pledge in accordance with the truth. My senior has taken a pledge of truth. Because of greed, confusion, or ignorance of darkness, I will not shatter that bridge of truth. The gods and the ancestors will not accept the offerings of those who are fickle and unstable in their intelligence and deviate from the truth. This is what we have heard. I can myself see that the dharma of truth pervades the atman. This burden of the truth has been accepted by virtuous people and has been respected as an objective. I forsake the dharma of kshatriyas. It is adharma in the name of dharma. It is practised by the greedy, the violent, the inferior and the performers of evil deeds. After having been thought of by the mind, the body performs wicked deeds and the tongue utters a falsehood. All three are forms of sin. The earth, deeds, fame, prosperity and heaven desire and seek a man who serves the truth.
You have used words of reason to persuade me to do seemingly beneficial things. However, what you have presented as superior is actually ignoble. I gave a pledge to my senior to reside in the forest. How can I abandon the pledge given to my senior and act in accordance with Bharata's words? The pledge and promise I made in the presence of my senior is inviolate. That is when Queen Kaikeyee was delighted in her mind. I will reside in the forest. I will control myself and eat pure food. With auspicious roots, flowers and fruits, I will render offerings to the gods and ancestors. In this world, I will satisfy my five senses and embark on this journey. Able to discriminate between what should be done and what should not be done, I will do this faithfully and without deceit. Having obtained this earth, an arena for action, I will undertake auspicious deeds. Agni, Vayu and Soma will receive their shares in the fruits of these acts. Having performed one hundred sacrifices, the lord of the gods went to heaven. Having practised fierce austerities, the maharshis obtained heaven. The virtuous have said that truth, dharma, valour, compassion towards beings, agreeable speech and worship to brahmanas, gods and guests are the paths to heaven. Those who are devoted to dharma, associating with virtuous men, those who are spirited and possess the foremost quality of generosity, those who are non-violent and those who are devoid of taints in this world are worshipped as the foremost among sages.'
The Valmiki Ramayana: Volume 1 by Bibek Debroy (based on the complete and unabridged text of the Critical Edition)
यथा हि चोरः स तथा हि बुद्ध | स्तथागतं नास्तिकमत्र विध्हि | तस्माद्धि यः शङ्क्यतमः प्रजानाम् | न नास्ति केनाभिमुखो बुधः स्यात् २-१०९-३४
- yathaahi tathaa hi = It is an exact state of the case; saH = that; buddhaH = a mere intellection; choraH = (is deserves to be punished) as a thief; viddhi = and know; naastikam = an atheist; atra = here; tathaagatam = to be on par with a mere intellectual; tasaat = therefore; yaH = he who; shaN^kya tamaH = is the most suspectable; prajaanaam = (should be punished in the interest of) the people; na syaat = In no case; buddhaH = should a wise man; abhimukhaH = consort; naastikaa = with an atheist.
"It is an exact state of the case that a mere intellection deserves to be punished as it were a thief and know an atheist to be on par with a mere intellectual. Therefore he is the most suspectable and should be punished in the interest of the poeple. In no case should a wise man consort with an atheist."
-Take only this from other verse
न नास्ति केनाभिमुखो बुधः स्यात् In no case should a wise man/buddha consort with an atheist."
Here Buddha is used in sense of enlightened person, it's not the Buddha of Buddhism as it says Buddha should not associate with atheist/nastika, but gautama Buddha was a nastika/atheist himself.
It's preposterous to think it as Buddha of buddhism, as Lord rama draws a comparison between an enlightened person in a theistic sense, this claim is made more solid when he draws a comparison between Buddha and nastika.
Buddha just means enlightened person, it has been used way before Buddhism came to be.
Point 2- there was no "buddhism" "Buddha" during time of Siddhartha gautama, Buddha was used in general sense for well read and enlightened person.
The oldest mention for Buddhism and it's followers comes with names such as- dhamma, Siddhartha dharma, gautama dharma, shunyavaada, shramanas
The name of baudha/Buddha got stuck very late during the times of hwang tsiang and other foreign converts who came to India, they even mention multiple Hindu gurus as Buddhas. So Buddha only referring to Buddhist Buddha is a very modern concept.
Valmiki ramyana by no means can refer to name which got identified to a rival philosophy and that to very late than the composition of ramayana.
Next time when someone claims this tell them that the name of Buddhism was very late furthermore the Buddha of ramayana is astika, theist unlike gautama.