Flow General Inc., the long-troubled biomedical products and applied sciences firm, said yesterday that it expects to report a $5.1 million loss for the final quarter of its fiscal year.

At the same time, Flow announced that it has reached an agreement with the Food and Drug Administration and the U.S. Attorney's Office allowing it to resume limited manufacturing at its biomedical products facility in McLean. The manufacturing facility has been shut down for two weeks after the Justice Department seized products made there, challenging their purity and the company's procedures.

The company said that the agreement, reached late last Friday, effectively settles its problems with the FDA. However, the FDA-related problems are expected to linger as a shadow on the balance sheet into Flow's current fiscal year.

Nonetheless, Flow's chairman and chief executive officer, Grant C. Ehrlich, said yesterday that he expects to end this fiscal year with a profit. "I feel we are on very solid ground for the first time in a long time," he said. The company reported a $34 million loss in fiscal 1983.

Flow had said previously that it expected to report a significant loss in the final quarter of its 1984 fiscal year, which ended June 30. Yesterday was the first time the company had attached figures to the anticipated results, which are expected to be released before the end of September.

"I think the turnaround has taken longer than expected," said Steve Handley, an industry analyst with L.F. Rothschild. "They probably felt they would be doing better by September 1984 than they are, but they're certainly going in the right direction."

Flow's recent troubles were a setback for a company that analysts have described as somewhat systematically solving a long list of problems -- including criminal charges filed against a subsidiary, shareholder litigation and other difficulties that date back to previous years and a previous top management.

On Aug. 22, the U.S. Attorney's Office for the Eastern District of Virginia, acting on behalf of the FDA, seized millions of dollars worth of tissue-culture products used in medical diagnosis and in research and raw materials, causing the company to close its McLean Flow Laboratories facility.

Last week, the company succeeded in getting raw materials returned. On Friday, Flow reached an agreement with federal agencies that allows the company to relabel and test diagnostic products that had been seized. The company also will voluntarily refrain from new production of diagnostic products until improvements already under way are completed, according to a statement issued yesterday.

The products in question account for about one-third of Flow Laboratories' domestic sales of approximately $18 million.

Shipment of some diagnostic products will resume in four to six weeks, the company said. Flow expects to resume full operations within 90 days, according to Ehrlich. The company provided no figure for costs related to the FDA's actions, but said that the combination of those costs with certain capital investments and non-recurring expenses for refurbishing laboratories will have some negative effect on the company's fiscal 1985 operating results. According to the company, however, they will not add significantly to the anticipated $5.1 million loss.

Ehrlich, who took over in March 1983, said yesterday that he expects the first quarter of this fiscal year to be "something less than highly desirable," but said that he expects gradual improvement as the year progresses and a profit by year-end.

"It's been 18 months, and we're just now feeling the turnaround effect and maybe have a couple of months before we're there," he said. "I thought it would have happened and should have happened before now." Ehrlich said the lag reflected some underestimation of problems such as inventory valuation and some surprises such as the FDA action, rather than any problems with products or personnel or any major management errors.