For the first time in two decades, Western nations last year sold less to Eastern Europe than they bought, the United Nations said. The West still enjoyed a favorable trade balance with the Soviet Union, exchanging machinery and pipeline equipment for oil and gas. But a UN annual survey said a profound adjustment was under way in East-West economic relations. Western imports from Eastern Europe fell 5 percent and exports to the East fell 21 percent last year. The turnaround from a $2 billion Western surplus in 1981 reflected import-curbing policies in the East.