TEGUCIGALPA, Honduras— WHEN Jose Benito Bravo Centeno, a 44-year-old senior Nicaraguan rebel commander, was arrested last March in Tegucigalpa with a small amount of cocaine, he was simply detained overnight and then deported, like a foreign dignitary, to the contras' enclave along the Honduran-Nicaraguan border.

The incident shows how the contras' encampment has become a virtual state within a state. Like invited guests who have overstayed their welcome, the combatants and their families, sympathizers, suppliers and assorted others have taken control of chunks of this strategically located country, which borders all three of the region's guerrilla wars - in Nicaragua, El Salvador and Guatemala. Tens of thousands of Nicaraguans and Salvadorans as well as hundreds of Guatemalans have fled into Honduras.

The contras began trickling into Honduras seven years ago, but did not begin arriving in large numbers until 1984. At first they were welcomed by Honduran officials, who viewed them as a buffer to Sandinista expansionism and adventurism.

In the latest sign that the country now regrets the decision, Foreign Minister Carlos Lopez Contreras, in a speech at the United Nations earlier this month, called for an international peacekeeping force to expel the rebels and to patrol the border.

The Hondurans, a Western diplomat said, ''are scared to death, scared out of their minds that they're going to be left between the rebels and the Sandinistas.''

Some Honduran officials note that, in a sense, crises elsewhere in Central America have been good for their country because they have led to heightened United States interest in Honduras. That has led to a policy in which Honduras has alternately protected the rebels and publicly called for their expulsion. As for forcing them out, one senior Foreign Minstry official said, ''Honduras is not in a position to intervene and sacrifice its young men.'' Battle-Tested Fighters

On plateaus amid the jungle-crowned volcanic ridges, the contras have built a series of sprawling camps in which more than 22,000 refugees registered with the Honduran Government now live. The Honduran Government, human rights groups and diplomats in Tegucigalpa estimate that the camps are inhabited by thousands of other refugees who have not registered with the Government and are in the country illegally.

Among the Nicaraguans in Honduras are an estimated 11,000 well-trained, battle-tested fighters - almost the same number of troops as in the Honduran Army. When visitors want to go to the contra camps, they apply to the rebels' command center, which operates as an unofficial embassy in Tegucigalpa and clears such requests with the Honduran military. The military has set up checkpoints along the main roads leading to the enclave, which covers an estimated 120-square-mile area north and east from Yamales, a five-hour drive from Tegucigalpa. Otherwise the military usually stays clear of the area.

''This is my home now,'' a 19-year-old Nicaraguan rebel said during a recent visit to his small shack near the border. He said he fled Nicaragua to join the contras at the camp about three years ago to escape the draft and because of what he called Sandinista persecution. ''I want to go back,'' he added. ''It's much better to walk and fight. But we don't have any weapons.''

The Hondurans are also cracking down on the thousands of Salvadoran refugees who live in camps along the Salvadoran border. Like the contra enclaves, the camps are almost foreign countries. They are financed by and are under the nominal control of the United Nations. Refugees in Colomoncagua, one of four Salvadoran camps along the disputed border, call their semi-permanent encampment ''The First Independent Republic of El Salvador.''

The encampments house 14,000 registered refugees and many others in the country illegally. They are self-governed and almost self-sufficient, producing clothes, shoes, kitchen utensils and musical instruments. Despite denials by the refugees, Honduran, Salvadoran and United States officials assert that the camps are training, supply and rest areas for the Farabundo Marti Liberation Front, the Marxist-led group fighting the United States-backed Salvadoran Government.

Honduran officers say their patrols occasionally have firefights with rebels crossing the border and that the fighting has spilled over into the camps.

''It's not only a problem of refugees, but also of violence,'' a Honduran military commander said. Like many other officials, he complained that the neighboring wars and the refugees have cast a criminal pall over the country and have attracted drug traffickers and gun runners who threaten to make the country ungovernable.

Some Hondurans living near the refugee camps have built lucrative businesses. ''I'll go wherever the contras go,'' said one woman who owns a travelling sundry store in one camp. But some farmers who eke out an existence along the frontier say the contras have driven them from their land. Others say the rebels have brought them to the brink of economic ruin.

''I'm scared to plant or harvest,'' said one coffee-grower. ''Who knows where there are mines?''

Those feelings are rippling across this country, Mr. Lopez Contreras, the Honduran Foreign Minister, suggested in his speech at the United Nations. ''For a small country like Honduras,'' he said, ''receiving such a high number of refugees is a burden that goes beyond its capacity.''

Photo of woman at a refugee camp for Salvadorans in Colomoncagua, Honduras (Impact Visuals/Steve Cagan); map of Honduras showing locations of Guatemalan, Salvadoran and Nicaraguan refugee camps (Source: United Nations)