What is minimal altitude that aircraft (rocket?) can fly above any country without any permission?
Actually, what you're asking are two different questions- According to ICAO ( ICAO Annex 11: Air Traffic Services), Class G airspace is uncontrolled and aircraft can fly in the without ATC permission. The definition if Class G is left to the regulatory authorities of individual countries (in US, it is where the other airspace classes are undefined). 

Where does the airspace of the country end is a completely different one and as of now, there is no agreed definition. The United Nations General Assembly Committe on Peaceful Uses of Outer space is still in the process of defining what exactly an outer space is.