David A. Stockman, erstwhile director of the Office of Management and Budget and frequent nemesis of environmentalists, left office last week clutching a fan letter from the National Wildlife Federation.

The occasion was Stockman's role in negotiating a cost-sharing agreement with Senate Republicans on construction of federal water projects. Under the agreement, tentatively accepted by the House, the Army Corps of Engineers cannot put a penny into 41 new federal water projects until state and local governments or the projects' beneficiaries agree to pay part of the costs.

The federation has long agitated for such cost-sharing provisions, arguing that federal largess has created dozens of environmentally damaging dams, harbors and diversion projects that would not have been built if somebody other than the government were paying for them.

While congratulating Stockman for his "professional and personal commitment" to budget reform in this case, the federation took pains to point out that it still is not keen on some of the former budget director's other positions. Among them: his recommendation that user fees from sport fishing equipment be sent to the general fund, rather than be used to support recreational boating and fishing facilities as the law requires.