Here is just a very brief list of well-known and prominent examples. Virtually all classical composers - Josef Haydn drew material from German folk tunes - and particularly in the Romantic and Modern Eras, drew from the folk musical traditions they were surrounded with. They by no means lived or worked in some sort of classical/academic musical isolation.
In his youth, Brahms worked with a Hungarian violinist, Eduard Remenyi, who introduced him to Hungarian and Gypsy folk music, which was very influential in his compositions. Among many other things, he later wrote a famous collection of Hungarian Dances (Brahms) .
Here is what appears to be a good article on the subject:
Brahms: The Hungarian Connection explores the composer's love of folk music from the country
Debussy, among the most notable of many, was deeply affected by
Javanese Gamelan Music :
Gamelan - Influence on Western music
The gamelan has been appreciated by several western composers of classical music, most famously Claude Debussy who heard a Javanese gamelan in the premiere of Louis-Albert Bourgault-Ducoudray's Rhapsodie Cambodgienne at the Paris Exposition of 1889 (World's Fair). The work had been written seven years earlier in 1882, but received its premiere only in 1889. The gamelan Debussy heard in it was in the slendro scale and was played by Central Javanese musicians.
Despite his enthusiasm, direct citations of gamelan scales, melodies, rhythms, or ensemble textures have not been located in any of Debussy's own compositions. However, the equal-tempered whole tone scale appears in his music of this time and afterward,[28] and a Javanese gamelan-like heterophonic texture is emulated on occasion, particularly in "Pagodes", from Estampes (solo piano, 1903), in which the great gong's cyclic punctuation is symbolized by a prominent perfect fifth.
The composer Erik Satie, an influential contemporary of Debussy, also heard the Javanese gamelan play at the Paris Exposition of 1889. The repetitively hypnotic effects of the gamelan were incorporated into Satie's exotic Gnossienne set for piano.
Direct homages to gamelan music are to be found in works for western instruments by John Cage, particularly his prepared piano pieces, Colin McPhee, Lou Harrison, Béla Bartók, Francis Poulenc, Olivier Messiaen, Pierre Boulez, Bronislaw Kaper and Benjamin Britten. In more recent times, American composers such as Henry Brant, Steve Reich, Philip Glass, Dennis Murphy, Loren Nerell, Michael Tenzer, Evan Ziporyn, Daniel James Wolf and Jody Diamond as well as Australian composers such as Peter Sculthorpe, Andrew Schultz and Ross Edwards have written several works with parts for gamelan instruments or full gamelan ensembles. I Nyoman Windha is among contemporary Indonesian composers that have written compositions using western instruments along with Gamelan. Hungarian composer György Ligeti wrote a piano étude called Galamb Borong influenced by gamelan. Avant-garde composer Harry Partch, one of America's most idiosyncratic composers, was also influenced by Gamelan, both in his microtonal compositions and the instruments he built for their performance...
Bella Bartok, credited by many as the first to seriously engage in ethnomusicology, was deeply influenced by the folk music of Hungary and Eastern Europe, from quite a young age:
Bartok - Early musical career (1899–1908)
In 1908, he [Bartok] and Kodály traveled into the countryside to collect and research old Magyar folk melodies. Their growing interest in folk music coincided with a contemporary social interest in traditional national culture. They made some surprising discoveries. Magyar folk music had previously been categorised as Gypsy music. The classic example is Franz Liszt's famous Hungarian Rhapsodies for piano, which he based on popular art songs performed by Romani bands of the time.
In contrast, Bartók and Kodály discovered that the old Magyar folk melodies were based on pentatonic scales, similar to those in Asian folk traditions, such as those of Central Asia, Anatolia and Siberia. Bartók and Kodály quickly set about incorporating elements of such Magyar peasant music into their compositions. They both frequently quoted folk song melodies verbatim and wrote pieces derived entirely from authentic songs. An example is his two volumes entitled For Children for solo piano, containing 80 folk tunes to which he wrote accompaniment. Bartók's style in his art music compositions was a synthesis of folk music, classicism, and modernism. His melodic and harmonic sense was profoundly influenced by the folk music of Hungary, Romania, and other nations. He was especially fond of the asymmetrical dance rhythms and pungent harmonies found in Bulgarian music. Most of his early compositions offer a blend of nationalist and late Romanticism elements.
In his later years in the USA, Bartok actually received a research fellowship from Columbia University to study Serbian and Croatian folk songs.
Bartók World War II and last years in America (1940–45)
Having first sent his manuscripts out of the country, Bartók reluctantly emigrated to the U.S. with his wife Ditta in October that year. They settled in New York City after arriving on the night of October 29–30, 1940 via a steamer from Lisbon... Supported by a research fellowship from Columbia University, for several years, Bartók and Ditta worked on a large collection of Serbian and Croatian folk songs in Columbia's libraries. Bartók's economic difficulties during his first years in America were mitigated by publication royalties, teaching and performance tours. While his finances were always precarious, he did not live and die in poverty as was the common myth. He had enough friends and supporters to ensure that there was sufficient money and work available for him to live on. Bartók was a proud man and did not easily accept charity. Despite being short on cash at times, he often refused money that his friends offered him out of their own pockets. Although he was not a member of the ASCAP, the society paid for any medical care he needed during his last two years. Bartók reluctantly accepted this (Chalmers 1995, 196–203).
As mentioned by @user1044 in their answer, many 20th Century American composers, such as Ives, Copland, Gershwin and Bernstein, incorporated jazz, blues and other 'folk music' genres into their compositions.