The phrase "Third World" was first coined in 1952 by Alfred Sauvy, so asking "what were the countries in each 'world' at the end of WWII" is a bit of an anachronism. It's also a bit fraught to ask whether Poland or East Germany should have been viewed as communist countries immediately after WWII, before the Soviet-backed communist parties in each country had fully consolidated their power. (It sure seems like we should in hindsight, but this was not as obvious at the time.) And, of course, most countries in Africa were not independent at this time. Despite these difficulties, though, we press on.
Sauvy's original article, a bit surprisingly, does not appear to be available online in English; but it is available in French. He doesn't carefully define what he means by "First World" or "Second World", since his focus is on the "Third World". Here are some pertinent excerpts (bolding mine):
Nous parlons volontiers des deux mondes en présence, de leur guerre possible, de leur coexistence, etc., oubliant trop souvent qu’il en existe un troisième, le plus important, et en somme, le premier dans la chronologie. C’est l’ensemble de ceux que l’on appelle, en style Nations Unies, les pays sous-développés. ...
Ce qui importe à chacun des deux mondes, c’est de conquérir le troisième ou du moins de l’avoir de son côté. Et de là viennent tous les troubles de la coexistence.
Le capitalisme d’Occident et le communisme oriental prennent appui l’un sur l’autre. Si l’un d’eux disparaissait, l’autre subirait une crise sans précédent. La coexistence des deux devraient être une marche vers quelque régime commun aussi lointain que discret.
which translates roughly as:
We talk freely of two worlds in existence, of their possible war, of their coexistence, etc., forgetting too often that there exists a third world, the largest, and really the first chronologically. This is the group of those countries that the United Nations calls underdeveloped. ...
What matters to each of the two worlds is to conquer the third, or at least to have it on its side. And from there comes all the problems of coexistence.
The capitalism of the West and the communism of the East bear on each other. If one of them disappeared, the other would suffer an unprecedented crisis. The coexistence of the two should be a step towards some common regime as distant as it is unclear.
From this it would seem that the three worlds are defined as:
- First World: Any country that has a capitalist system of government, and was not viewed by the UN as underdeveloped.
- Second World: Any country that has a communist system of government, and was not viewed by the UN as underdeveloped.
- Third World: Underdeveloped countries.
In particular, I strongly suspect that Sauvy would have viewed Ireland, Sweden, Switzerland, Finland, and Austria as "First World" countries, even though they were not part of NATO. I also suspect that he might have viewed China as "Third World", even though it had a communist regime, since it was not at all industrially developed in 1952.