The controversial word "Mleccha" is used to denote foreigners and barbarians in Hindu scriptures. This word is present in most Puranas and Dharmasastras. Is this word also present in the Vedas?
Yes, it's present in the Vedas but not earlier than the Brāhmaṇas according to a paper The Foreigner As The Other In Early India by Aloka Parasher-Sen on this subject:
There is evidence that the Indians of the Vedic period had contact with the people of foreign countries. During the reign of Darius (522-486 B.C.) the Persians ruled over the Indus valley region and the adjoining areas. The Persians, known as Pahlavas in later Sanskrit literature, are not designated as mleccha during this period, apparently because they did not interfere with the brāhmaṇical way of life. Except for the evidence from a passage of the Śatapatha Brāhmaṇa regarding the concept of the mleccha or barbarian, there is no further example of the kind in any of the Vedic texts. The Yavanas are mentioned by Pāṇini in one of his sūtras but not as mlecchas. In the Gautama Dharmasūtra Yavana is noted as a mixed caste but, again, not as a mleccha. The creation of the image of foreigners as mleccha, that is, barbarians, thus, cannot be attributed to the early authors of the brāhmaṇical texts.
Transliteration of the said verse in Śatapatha-brāhmaṇa, Kāṇḍa III, Adhyāya 2, Brāhmaṇa 1 (Mādhyandina recension) from GRETIL:
tatraitāmapi vācamūduḥ | upajijñāsyāṃ sa mlecastasmānna brāhmaṇo mlecedasuryā
haiṣā vā natevaiṣa dviṣatāṃ sapatnānāmādatte vācaṃ te 'syāttavacasaḥ parābhavanti
Translation by Julius Eggeling at wisdomlib.org:
24. Such was the unintelligible speech which they then uttered,--and he (who speaks thus) is a Mleccha (barbarian). Hence let no Brahman speak barbarous language, since such is the speech of the Asuras. Thus alone he deprives his spiteful enemies of speech; and whosoever knows this, his enemies, being deprived of speech, are undone.
The same author also explains the context of these verses in another paper, Attitudes Towards The Mleccha In Early Northern India - up to c. A.D. 600:
Mleccha speech in the Śatapatha Brāhmaṇa is synonymous with that of the Asuras and he'lavo he'lava is given as the only specimen of that speech. The reason given for the utterance of such unintelligible words by the Asuras was their defeat at the hands of the Devas. The latter, being more clever and powerful, took the possession of vāc by offering her an anuṣṭubh verse. The following passage instructs brāhmaṇas to avoid mleccha language because when it was used by the Asuras it destroyed them.
Since the Asuras were not called mlecchas but uttered words that were spoken by such people, there are three possibilities - that mleccha or barbarian speech could have meant hostile or vulgar speech; or a foreign or alien language; or the mispronunciation of proper speech, in this case Sanskrit. The last plausibility arises out of Sāyaṇācārya's explanation of the specimen of mleccha speech he'lavo he'lava, which, he suggests, stood for he'rayo he'raya meaning "O the (spiteful) enemies". Patañjali in the Mahābhāṣya, setting out to explain te'surāḥ, has given the variant reading he'layo he'laya which was used by Sāyaṇa to explain his theory. The mleccha phrase he'layo he'laya, Patañjali explained, was a corrupt expression (apaśabda) and this was not sanctioned by grammar. His main concern being the study of grammar, he too instructed brāhmaṇas not to use mleccha words.
The emphasis on the mleccha's failure to pronounce the sounds r and y indicates the possibility that the reference to mleccha speech in the Śatapatha Brāhmaṇa could have been to a Prakrit dialect...