In March of 1939, "With Germany's permission" (WW2 for dummies), Poland invaded Czechoslovakia while Germany was annexing the Sudetenland per the Munich agreement. Only 6 months later in September, Germany invaded Poland. Was there a loose alliance before the initial invasion that triggered WW2? I would find that hard to believe since Poland was a result of Germany's defeat in the great war.
You are conflating a bunch of different things.
The creation of Poland and Czechoslovakia
Poland was not a result of Germany's defeat in the Great War. When Russia signed the humiliating Treaty of Brest-Litovsk, one of Germany's demands was the creation of a sovereign Polish state out of a portion of the ceded lands.
The Treaty of Versailles attributed a bunch of new land to what became the Second Polish Republic, carved out of the defeated Central Powers on the basis that this land was inhabited by Poles. The same treaty recognized several new states, primarily those that sprung up out of Austria-Hungary's collapse. Czechoslovakia was one of those states.
The trouble with this situation was that not everyone agreed exactly where one nationality's lands ended, and another's began. A series of wars between Eastern European countries continued until the early 1920s, including battles between the Czechoslovaks and Poles.
Fate of Czechoslovakia
Hitler's annexation of the Sudetenland severely weakened Czechoslovakia; much of its military installations and industry was now gone, and it became clear to the world that the Czechs were at the mercy of Germany. Poland took the opportunity to annex a small region with a strategically important railway center in a contested province; the choice for Prague was between giving it up to the Germans, or to the Poles.
At the same time, 10,000km of Czechoslovakia were ceded by Hitler to Hungary. The visual comparison between who got what is striking.
Poland did not get any more land from Czechoslovakia. When Hitler invaded in March of 1939, the land of the former Czechoslovak state was split between Germany, its puppet Slovakia, and a briefly-independent Carpatho-Ukrainian state that was immediately absorbed into Hungary.