The House of Representatives yesterday waded into the controversy over the dangerously declining striped bass, or rockfish, by approving a measure to allow federal bans on catching the fish in any state that does not carry out voluntary conservation efforts.

Lawmakers from the Eastern Shore districts of Virginia and Maryland vigorously opposed the legislation, arguing that the federal government has no business in fish management because the states themselves are already doing the job.

"The federal government usually comes in when the states are woefully neglecting a problem. That's not the case here," said Rep. Roy Dyson (D-Md.) after the bill was approved on a voice vote.

But proponents argued that the 12 states where rockfish are caught have been slow to comply with measures for reducing their rockfish catch, established by their own association, the Atlantic States Marine Fisheries Commission.

"Unless something is done . . . there will be nothing to catch in the future," said Gerry E. Studds (D-Mass.), the bill's chief sponsor.

The bill would give the secretary of commerce a mandate to impose a one-year ban on catching rockfish in any states that do not reduce their catches by 55 percent by June 1985.

The measure still requires Senate action, which Dyson predicted was unlikely as Congress groped toward its targeted adjournment next week.

Maryland surprised other Atlantic Coast states last month by announcing that it will impose a ban Jan. 1 on commercial and sport fishing for rockfish, the most valuable commercial fin fish in the Chesapeake Bay.

The state got a cool reception this week when it made its case for similar state-imposed bans at a conference in Savannah, Ga.

Dyson, whose district is the home of about 10,000 watermen, said yesterday he is hoping that Maryland officials will rescind the moratorium. In any case, he does not want to see moratoriums imposed by the federal government.

Virginia, which is conducting its own conservation program, would not be immediately affected by the legislation, but the measure "could be a threat in the future," according to Rep. Herbert H. Bateman (R-Va.). Bateman said the state has reduced its catch so far this year by about 74 percent.

Bateman proposed an amendment that would have softened the measure by saying that states making "substantial progress" toward compliance would not be penalized with a ban.

That amendment was defeated by a vote of 98 to 307. Rep. Frederick C. Boucher (D) was the only Virginia lawmaker to vote against the amendment. Maryland Democratic Reps. Michael D. Barnes, Steny H. Hoyer, Clarence D. Long, Barbara A. Mikulski and Parren J. Mitchell also voted against it.