The only source I can find on this that seems reliable is the website of the American embassy in Serbia:
On July 28, 1918, President Woodrow Wilson gave the following message to the American people. It was read in churches throughout the country and published in virtually all major newspapers. The Serbian flag was raised over the White House and all public buildings in the nation's capital. The message read:
To the People of the United States:
On Sunday, 28th of this present month, will occur the fourth anniversary of the day when the gallant people of Serbia, rather than submit to the studied and ignoble exactions of a prearranged foe, were called upon by the war declaration of Austria-Hungary to defend their territory and their homes against an enemy bent on their destruction. Nobly did they respond. So valiantly and courageously did they oppose the forces of a country ten times greater in population and resources that it was only after they had thrice driven the Austrians back and Germany and Bulgaria had come to the aid of Austria that they were compelled to retreat into Albania. While their territory has been devastated and their homes despoiled, the spirit of the Serbian people has not been broken. Though overwhelmed by superior forces, their love of freedom remains unabated. Brutal force has left unaffected their firm determination to sacrifice everything for liberty and independence.
It is fitting that the people of the United States, dedicated to the self-evident truth that is the right of the people of all nations, small as well as great, to live their own lives and choose their own Government, and remembering that the principles for which Serbia has so nobly fought and suffered are those for which the United States is fighting, should on the occasion of this anniversary manifest in an appropriate manner their war sympathy with this oppressed people who have so heroically resisted the aims of the Germanic nations to master the world. At the same time, we should not forget the kindred people of the Great Slavic race--the Poles, the Czechs and Jugo-Slavs, who, now dominated and oppressed by alien races yearn for independence and national unity.
This can be done in a manner no more appropriate than in our churches.
I, therefore, appeal to the people of the United States of all faiths and creeds to assemble in their several places of worship on Sunday July 28, for the purpose of giving expression to their sympathy with this subjugated people and their oppressed and dominated kindred on other lands, and to invoke the blessings of Almighty God upon them and upon the cause to which they are pledged.
Woodrow Wilson, President The White House, July 1918
http://serbia.usembassy.gov/when-the-serbian-flag-flew-over-the-white-house.html
No. According to this contemporary report in the New York Times, the French flag was flown over the White House in 1920.
[This article] (http://voiceofserbia.org/content/day-when-serbian-flag-flew-over-white-house) suggests that those were the only two times, but I wonder if the British flag was ever raised during the burning of Washington.
Edit: the New York Times article, written two years after the Serbian flag was supposedly flown, says that the French flag was the first foreign one to fly. I wonder if the Serbian flag story is an urban myth?
Edit 2: It's not in the abstract and I'm not a subscriber so I can't access the full article but [here's the link for the contemporary New York Times article on the day the Serbian flag supposedly flew over the White House] (http://query.nytimes.com/gst/abstract.html?res=9406E4D8143EE433A25754C2A9619C946996D6CF). If anyone else can read it and report back we can maybe solve this mystery of history.
I've found a contemporary reference to something that sounds like this event, although it's light on detail. It's in an Detroit News article from 19 Aug 1918 called "How Our Alien-Born Help Win the War". The article starts on page 84 of (this collection)[http://libcudl.colorado.edu:8180/luna/servlet/detail/UCBOULDERCB15858470752128311:Washington-in-war-times] and the flag raising is in the very last section on page 89.
"One day when they hauled the Stars and Stripes to the top of the White House staff, another flag followed it on a staff nearby--it was the flag of Serbia."
Whether this event is correctly reported or not I can't say. It could just be a mangled reference to that Yugoslav flag raising at the Agriculture Department on July 4. And really it's not even clear that "a staff nearby" means a staff at the White House itself.