STRASBOURG, France (AP) _ The European Parliament today urged the Soviet Union to release Mathias Rust, the West German teen-ager sentenced to four years in a labor camp for flying a small plane into Red Square.

West German authorities, meanwhile, said that when Rust returns home he could be charged with violating flight regulations in connection with the unauthorized flight from Finland to Moscow.

The European Parliament adopted a resolution saying the prison term was too harsh for the 19-year-old pilot who landed beside the Kremlin on May 28. The Parliament acknowledged Rust acted illegally but without malice.

Rust's unimpeded flight over Soviet territory triggered a shake-up of the Soviet military.

British Conservative Lord Nicolas Bethell, who drafted the resolution, accused the Soviet trial judge of deciding Rust's punishment on ''political'' rather than legal merits.

Some diplomats in Moscow have speculated that the Soviet Union may release Rust next month when it marks the 70th anniversary of the October Revolution.

The public prosecutor's office in Itzehoe, near Hamburg in northern West Germany, said it was investigating the flight. Rust is from Hamburg.

In a statement, the prosecutor's office in Itzehoe said will question Rust about his flight when he returns to West Germany.

The prosecutor's office opened the investigation after Rust's flight and said he could be charged with violating flight regulations, independent of the decision of the Moscow court.

A Soviet court sentenced Rust to four years in a labor camp on Sept. 4. Rust's parents have appealed to Soviet authorities to pardon their son and a Soviet official said their request was being studied.