That is a good question and the answer is yes. The best example that I can think of is the Roman Empire. There was no power greater than Rome in the ancient world, and yet the Barbarian invasions defeated Rome. In 410 AD, Rome, the eternal city, as the Roman called it, was sacked. This was a huge psychological blow to the Romans, because they believe that Rome was unsackable. Moreover, the Roman had such a great history when it came to warfare. They defeated practically everybody and yet they still lost.
I think the American Revolution might be an example of this. It would seem to me that England, a colonial world power, with tremendous material development, was the loser. This clearly was a war, as opposed to the "actions" that sometimes take place in the world. The American colonies were not exactly a third world country, since their development was on a strong, upward trajectory, but nevertheless, England was a far more developed country in comparison, with strong financial institutions, a wealthy upper class, and a relatively stable economy. I suppose that there might be an argument that this does not count because we were not yet a nation, but as I recall, we declared independence, fought a war, and won it!
It really depends a lot on what you mean by defeated.
The most obvious examples would be from the guerrilla wars of the 20th century. What I'm talking about when I say this is the war between the Vietnamese and the United States and the war between the Afghans and the Soviet Union.
In both of these cases, the society that was less materially advanced made the other society give up and go away. Of course, the winning side in each war was getting material help from other advanced countries. In addition, neither of the winning sides won militarily really, they won politically.
However, if you are talking about a major war where a less developed society's armies defeated those of an advanced society in open combat, I cannot think of an example.
Jared Diamond in third chapter of his book Guns, Germs and Steel analysing the causes of defeat of Incas by Pizarro in 1532 identifies several factors that contributed to victory of the Spanish. These includes superiority of weapons of war, internal conflict within Inca leadership, diseases transmitted to Incas by the Europeans. Thus even by analysis of Diamond, it is the superiority in technology and art of war and not the superiority of the entire social advancement that determines success in wars.
The previous two posts gives some examples of less advanced societies scoring military success over the more advanced ones. I will go a step further and state that in the past most of the greatest military leaders of the world, because of their superior military capability, have usually led people considered less civilized, to defeat much more civilized nations. Successes of military leaders like Genghis Khan and Attila illustrate this point.
You might check out this question and anwer.
I would disagree on saying that the NVA or Mujahadeen were less technologically advanced than their invaders when it came to weapons and fighting. Yes, the US was a more advanced country than Vietnam. However the NVA and Vietcong were being supplied rifles ammunition and other supplies from Russia and China. The american M16 non A1 was a horrible rifle to have in the jungle. For example, the round would not penetrate thick brush well, and the rifle had poor reliability due to the ball powder in the cartridge and many other kinks we hadn't worked out like chrome lined barrels and cleaning kits. So Vietnam was more of a tactics and home field advantage. We had the support of helicopters and Jets dropping napalm but lost because of political issues at home. Jared Diamond mentions this regarding china. He says that the chinese emperor banned sea travel and that caused china not to have as much of a hold in colonization. So a large unified country i.e.: China, USA. had less of a chance than many small european countries in domination and colonization. He also sites the Dutch expansion north further into africa, as a less advanced society having an advantage. The dutch living in the temperate mirror of europe in South Africa had crossed the Tropic of Capricorn and were being infected by Malaria and other diseases. Their cattle died, their crops died and they died aswell. In this instance Germs and Geography worked against the european invaders as the natives learned to limit their risk and herd animals and farm in this environment.