According to Wikipedia the communist leader of Romania (member of the Warsaw Pact) said that the invasion of Czechoslovakia by the Warsaw Pact forces is a "grave error". How could he "get away" with this speech? I mean the Soviet Union just proved they are ready to invade an ally if it steps out of the line... Why did Romania not suffer consequences?
Because the USSR didn't have unlimited resources. It was overmatched Vs Czechoslovakia, but invasions still cost money, labour, and materials.
Czechoslovakia made the strategically sound decision to resist through civil disobedience, instead of militarily. However, it's not always guaranteed that a big country beats a small country in a war. Vietnam beat China despite being outnumbered: although China had more troops, it also needed more of them for other tasks, including defending its long borders with India and the Soviets, and suppressing internal dissent.
Secondly, the Soviets had to maintain the fiction of communist countries fighting in brotherhood against a fascist counter-revolution. 1956 and 1968 marked the beginning of terminal decline in West European communist parties, both in their electoral success and their adherence to the USSR as an ideal. Most of the east European client states supported the attack on Czechoslovakia, but I doubt that they particularly liked helping Brezhnev out. If he was going to keep asking over and over again, they might even have got it into their heads to stick together against the Russians, and Brezhnev wouldn’t want that.
Romania was already on the sidelines of Soviet influence, pretty much sailed its own course through their socialist experiment.
Their armed forces weren't under (direct) Soviet control like those of the other Warsaw Pact countries, their officers weren't being trained/indoctrinated in Soviet military schools, their entire country was already mobilised against any foreign threat, INCLUDING a potential Soviet invasion.
Most likely then Moscow considered taking action against them similar to what they had done in Prague and earlier Budapest to end up being too costly for the potential rewards.
Allowing the semi-rogueish Romanian dictator his moment in the spotlights (he had been a supporter of the Czech's actions before the Soviet invasion too) probably seemed to them to be the most prudent course of action. It wouldn't change anything in the relationship between Romania and the USSR after all, and would show the rest of the Warsaw Pact that the USSR could be gentle and overlook a bit of dissent from its underlings as long as they fell in line where important (economic cooperation, a single military block against NATO, etc).
Read this for a lot of information about the era.
Few weeks ago I heard an interview on Czech radio program Radiožurnál about a possible motivation of Soviet Union to invade Czechoslovakia with such violent force: Czechoslovakia - the Soviet Bloc's sharp spike into the western Europe, had resisted silently but very vehemently a Soviet plan of stationing tactical nuclear and chemical weaponry within their borders, and said weapons were deployed very shortly after the invasion.
What follows is my take on the events, as I'm not that well studies in works of professional analysts.
Certainly Dubček et al weren't particularly aligned with Soviet political plans as well, but a military action of such magnitude against a brother in the socialist camp must have had a considerable military objective. Recent studies of Czechoslovak army archives show that Czechoslovak People's Army was slated to be the first wave of attack in the Soviet military doctrine (I'll post a reference as soon as I find a reasonable one, I heard that some time ago on radio). And of course, the Soviet army dug itself deep, stationed tens of thousands of soldiers and never left the communist Czechoslovakia (and had to be expelled after the Velvet Revolution of 1989). In contrast, other Warsaw Pact armies assisted with the invasion, but haven't remained long after.
Since time was of essence (the counter revolution was a perfect ruse, yes, but the deployment plans were already two years overdue at that point) and the real reason behind the invasion was better not to be discussed openly, it could have prove more damaging than helpful to force the then relatively independent Romania into the invasion or openly reprimand it afterwards*.
Besides Romania, communist states of Yugoslavia, Albania and Cuba supported Czechoslovakia (Albania was a member state of the Warsaw Pact as well).
*Looking at the most recent Russian invasion (Crimea), one could observe that an effective Russian strategy is to build up to the fail accompli as quickly as possible and than limit any international discussion of the topic as strongly as possible (in pretending that the act of military aggression never happened).
While Ceausescu's anti-Soviet stand had much echo internationally, Ceausescu's interests were mostly internal, concerning his position as leader of the Communist Party and the communist model that he wanted to safe-keep, promote and develop.
In order for USSR to take action against Romania, the reasons and the effects of Ceauşescu's position should have been severely contrary to the Soviet interest: that they were not.
The reasons are related to the stage of the development of communism in Romania at that time.
Because of the specific traditions and conditions of the country, two aspects became dominant: the total control of the Romanian Communist Party over the society, with no real opposition and no perspective of opposition, and the development of the nationalist discourse within the communist one. These two aspects were complementary.
For historical, economical, cultural, political reasons that are hard to evaluate, Romania lacked the "inertia" against Soviet communism that always made itself felt and amounted to real resistance in Poland, Hungary and Czechoslovakia, were the communist leadership was more collegial then personal and was always confronted with the double imperative of coping with possible civil unrest and avoid Soviet intervention. While Hungary was the object of a such intervention in 1956, Czechoslovakia in 1968, and Poland was under serious threat after 1980, Romania was never threatened by that. - If some internal dissent was present in Romanian intellectual circles, that was only because of the relative "liberalization" of the censorship in the sixties (by contrast to the fifties and eighties) which itself was a sign that the Party was relaxed and didn't felt threatened. Romania was a very good pupil that called for no reprimanding from the teacher, and even one that would try to surpass its teacher.
As time passed and the Ceausescu regime became more rigid in the eighties, following a more and more puritan communist dogma - that mimicked the North-Korean model - and trying to permeate absolutely all aspects of life, it probably felt the greatest inertia from the part of the peasant class, and at that point Ceausescu started his infamous (but in fact rather limited and ineffectual) "systematization" of villages (partially inspired by the North-Korean model, but trying to solve the same problem that Lenin and Stalin had faced when trying to impose a Marxian proletarian revolution in a rural agrarian country were industrial workers were a minority), which went in parallel with a process of forced industrialization.
Communist nationalism was a normal stage in the development of Soviet-modeled communism. USSR is a good example for that during the Stalinist era, were strong personal leadership amounting to a personality cult coincided with the exaltation of Russian nationalism. Like Stalin, Ceausescu benefited internally from flattering nationalist sentiment. And the fact that, given the 1968 invasion, he seemed to counter the Soviet power, brought him even the solidarity of those that resisted communism for nationalistic reasons. Like Stalin who was both a revolutionary and a continuator of the tsarists tradition, Ceausescu could look to the country's past and try to promote himself in the continuation of a long line of authoritarian rulers.
In following strictly this communist and byzantine model Ceausescu contravened the Khrushchevian model, and therefore was in tune with Brezhnev's. Khrushchev had initiated a process of reforms that had been aggravating the continuous dilemma the satellite countries faced, of navigating between internal unrest and Soviet obedience. Reforms in USSR should have entailed reforms in the satellite countries. Such reforms might have triggered unrest, which forced the leadership to react one way or the other: Hungary went towards liberalization, Romania went the other way. This dilemma was faced by Khrushchev himself, and it would end in him being ousted.
As for the effects of Ceausescu's position of 1968, that crisis was in fact a great opportunity for him of confirming and clarifying his position, by precisely not taking part in the invasion of Czechoslovakia. His position was very stable, he didn't need to prove his communist orthodoxy, was in perfect accord to Brezhnevian ways (any dissension arising not from opposition, but rather from competition under the same flag), therefore he had very little to gain from taking part to the invasion: while, by not taking part, he had a lot to gain both internally (for nationalistic reasons) and externally, as he attracted a lot of sympathy and influence in the West and in the non-aligned movement.
Brezhnevian USSR had nothing to lose from all this. USSR was powerful enough to be sure that any country following Soviet-style communism would never leave its gravitational grip. The only thing encouraging real independence of the satellite countries would have been unrest and reforms of this orthodox model. USSR was therefore interested first of all in the stability of the communist block, and Romania was a very solid brick in that block's walls. What disturbed Brezhnev in Czechoslovakia was not that the communists there were too independent, on the contrary: that the "real" (pro-soviet) communists there were dependent upon Soviet assistance in order for them to be able to promote "real communism", and the invasion provided that assistance... Such assistance was not needed in Romania.
1968 was an important year in the history of "real communism", in that it was the end of the hopes of reform for another 10-15 years. Ceausescu's demise would come with Gorbachev, the Soviet leader who would bring back to life the Khrushchev's trend of reforms, push them further and bring the collapse of the whole block.
Ceausescu was promoting himself in Romania and in the West as independent from the Soviets. This was true in the sense that intellectually he was a real mature communist that didn't need lessons from USSR anymore, practically following the old Soviet strategy of "socialism in one country", which married Leninist orthodoxy and national sovereignty. Both Romanians and the West interpreted this wrongly, the former as patriotic devotion and the latter as reformism. His patriotism and his reformism were real, but served his main ideal, which was a very pure communist project in his country.
Described by some as a mad dictator, Ceausescu was in fact following very lucidly the logic of the system he embodied. There was no madness other than this very logic, which he followed with utmost coherence, even beyond the contradictions that affected USSR with Khrushchev and would again with Gorbachev: his communist orthodoxy doubled by his politically relative but intellectually effective independence from the Soviet model brought him closer in the seventies and eighties to the models of Mao's China and especially of Kim Il Sung's North Korea; (Kim Il Sung is known as Kim Ir Sen in Romanian and other languages).
He had in fact bet on the winning horse of communism, which is still around and kicking.
Geopolitics play a big role here too. Romania was not a direct neighbor of Czechoslovakia, and no country invading the latter had to pass through Romania: that made it easier for Ceausescu to act as he did, as geographically he was isolated enough in 1968. The situation would be different in 1989, as he lacked the geopolitical advantages enjoyed by the Kim dynasty.