An attempt to rush 27,000 refugees into West Berlin on a roundabout route through Communist Eastern Europe has apparently been thwarted, the West German Foreign Ministry said. A spokesman said the plan had involved ferrying 600 busloads of asylum-seekers from Turkey to Bulgaria and from there to West Berlin. Bulgarian authorities said the first busloads of refugees, mostly Turks and Iranians, were turned back at the Turkish frontier and will not be allowed to cross without West German entry visas. "The Bulgarian action appears to have resolved the problem, and we are grateful," the Bonn spokesman said. Under pressure from Bonn, East Germany announced Sept. 18 that it would restrict the flow of Third World refugees into West Berlin, beginning Wednesday.