The first significant congressional obstacle to President Carter's plan for fielding a quick-reaction force in the Indian Ocean theater has emerged from a dispute over Somali troops in Ethiopia's Ogaden.

The Central Intelligence Agency, in what some members considered a direct contradiction of State Department assurance, told a secret session of the House Foreign Affairs Africa subcommittee that elements of three Somali regular battalions were still in the Ogaden.

The CIA, sources said, also told the subcommittee on Tuesday that from 300 to 1,000 Somali regulars were serving as "volunteers" with the insurgents trying to annex the Ogaden to Somalia.

Although Chairman Stephen J. Solarz (D-N.Y.) would not confirm those estimates, he told The Washington Post yesterday that there was indeed "a sharp difference" between what the State Department had told his subcommittee in public and what the agency had said in secret about the Somali troop presence in the Ogaden.

This discrepancy, he said, triggered the drafting of a letter to Secretary of State Edmund S. Muskie setting forth subcommittee fears about entering into a military relationship with Somalia in exchange for American use of its ports of Berbera and Mogadishu on the Horn of Africa.

The Africa subcommittee can protest, but not stop, the Carter administration's plan to reprogram $20 million in fiscal 1980 funds to start selling U.S. weapons to Somalia as part of the ports deal.

Another $20 million in credits for weapons would be extended to Somalia in fiscal 1981, and undisclosed amounts in future years under the recently negotiated agreement. Also, the United States would spend $11 million improving the Berbera and Mogadishu port under the deal.

Since the House subcommittee is a key congressional review panel for administration policies in Africa, its opposition to the Somalia military agreements could mark the beginning to the blueprint for the Rapid Deployment Force.

The Rapid Depolyment Force is a combination of existing Army, Navy, Air Force and Marine units that will be trained to respond quickly in various-sized task forces to trouble spots around the world. The oil-rich Persian Gulf is the prime focus of contingency planning at the moment.

The Pentagon views Somalia's ports of Berbera and Mogadishu as vital stopping-off points for the U.S. Navy in peacetime and crucially needed launching pads for American forces in times of crisis in the Indian Ocean theater.

But Solarz and his subcommittee allies are challenging the wisdom of getting the United States entangled through military agreements with a country like Somalia, which is fighting an on-again off-again war with its neighbor, Ethiopa.

[Somalia's Defense Ministry reported yesterday that Ethiopian army forces, backed by air strikes, invaded northwestern Somalia. The Ministry said heavy fighting was under way along a 27-mile-wide front. The report could not be immediately confirmed. Washington sources were skeptical that the operation was as big as the ministry claimed but acknowledged their own information was skimpy.]

Once the United States links itself militarily with Somalia, Solarz contended yesterday, United States leaders will find themselves confronted with this dilemma whenever the Somali-Ethiopian conflict heats up:

"Stand by and do nothing, and be accused of abandoning another friend; do something and get involved in a regional conflict."

The Carter administration itself has debated those poles of the argument in past conflicts in Africa. Soviet-financed Cubans in Ethiopia are particularly vexing to some administration leaders looking for a way to combat Soviet influence in Africa.

Richard M. Moose, assistant secretary of state for African affairs, had tried to reassure the House Africa subcommittee on Tuesday that Somalia was no longer seeking a military solution to the Ogaden conflict, but a political one.

Asked repeatedly by Solarz whether there was any significant number of Somali regular troops still in the Ogaden, Moose said: "I do not believe there is any significant body of Somali forces in Ogaden . . . I doubt there are any Somali battalions. It's very possible there are Somali patrols."

Shortly after Moose gave those and other assurances of Somalia's good intentions, the subcommittee went into excutive session to hear the CIA's estimate of Somali troop presence in the Ogden. Although the estimates wer hedged, subcommittee members emerged with the conviction they had heard two conflicting reports.

Solarz predicted yesterday that the majority of his eight-member subcommittee would sign the letter to Muskie opposing the start of arms sales to Somalia and other military Links.

The Pentagon has also signed an agreement with Kenya to allow U.S. use of the port of Mombasa, another arrangement the subcommittee will review.