Provincial Premier Rene Levesque, vowing that "Quebec must become a country," today won an overwhelming endorsement from his party to seek sovereignty or this French-speaking province while keeping it in economic association with the rest of Canada.

For the first time since coming to power in 1976, Levesque's Parti Quebecois adopted a detailed program on sovereignty and gave a clear mandate to the premier to take it to the voters and the country at large.

More than 1,800 delegates attending the Parti Quebecois party conference gave Levesque repeated standing ovations when he asserted that "independence is essential" for Quebec development nnd that most of the province's 6.3 million residents would back his program in a referendum to be held in the coming months.

If English-speaking Canada refuses to negotiate a treaty of economic association, Levesque said, "We will have to go back to the people. What we propose is to become a fully independent country but that would have to be approved by the people."

Levesque appeared to be taking a tougher position apparently in response to militant separatists' demands for action, but he stopped short of a pledge for unilateral independence now.

After three days of deliberation the party congress ppproved a broad program that calls for a monetary union with English-speaking Canada, free movement of people and capital, a free zone and common tariff policies.

Under the program, a sovereign Quebec would assume exclusive powers in the fields of legislation, taxation, foreign policy, internal security and defense. The program provides for Quebec participation in NATO and in the North American air defense system.

No date for the referendum was announced but Levesque has said earlier that he would announce it before June 22.

The congress ended on the eve of the inauguration of a new government in Ottawa after a federal election last week that left Canada deeply split along linguistic lines.

The separatists argue that the outcome of the federal election confirmed the two-nation concept of Canada and reinforced their belief that French-speaking Quebec must become a sovereign state. They point out that the alternative to the two-nation concept advocated by Pierre Trudeau - the concept of a bilingual nation - had been rejected with the defeat of Trudeau's Liberals.

The Progressive-Conservative Party of Prime Minister-elect Joe Clark won only two of Quebec's 75 parliamentary seats, leaving Quebec virtually unrepresented in the new national government.

Despite optimism and partisan cheering the past three days, the Parti Quebecois has suffered a series of setbacks in recent months that included profound division among party faithful over the strategy and tactics in the forthcoming referendum.

Apart from losing two by-elections by wide margins, the party was shaken three weeks ago when Robert Burns, a senior Quebec Cabinet minister and parliamentary leader of the party prior to Levesque's elction in 1975, resigned, predicting that the separatists would lose the referendum and the next provincial elections.

The party's divisions were evident at the congress - the seventh since the party was founded 12 years ago - with more radical elements seeking a decisive drive for sovereignty against Levesque's step-by-step approach.

The militants seem particularly eager to have the referendum held this fall, arguing that delays would lead to defeatism and demoralization in party ranks.Levesque and his key aides reportedly are inclined to wait until next spring in hopes for an upturn in the party's fortunes.

The tensions were reflected in a close contest for the party's vice presidency between Pierre Renaud, who was Levesque's choice for the post, and Louise Harel, the candidate of militant separatists.

Harel's election was seen as a backhanded slap at Levesque by the militants.

But the vice presidential contest was largely symbolic and the party swung behind Levesque on the substantive aspects of his policy.

The new program defines the association of a sovereign Quebec with the rest of Canada in terms of several common institutions in which the two sides would be represented on a 50-50 basis. They include:

While keeping the common currency, the two entities would have separate central banks although a joint board of governors would direct broad policies. The distribution of assets and liabilities of the Bank of Canada is subject to negotiations.

A committee of ministers representing the two sides would coordinate economic policies.

New agreements to be negotiated on air, rail and navigational transport.

In the economic field, the program foresees a free trade zone that would preclude indirect taxes on goods produced by the two sides but would include common tariffs on third countries' products.

Quebec would have no military service and would maintain a police force under exclusive Quebec control.

The party program also envisages a special agreement on the St. Lawrence Seaway to be concluded among Quebec, Canada and the United States.

In his final address to the congress, Levesque expressed the hope that the rest of Canada will eventually accept the decision of the Quebec peop le.

"Two democratic societies that have so much in common will prove able to take up this challenge and they will come out of this together, side by side, with an understanding, a frankness and a renewed mutual respect, that is to say all the ingredients upon which can be established a true and lasting friendship.

"I'll bet you that next to the historic 'yes' that we shall soon hear, the results of the Nov. 15, 1976, election were indeed small potatoes," he said, referring to the date when his party was surprisingly swept to power in Quebec.

"Very soon this will become a reality and we will wonder why it took so long." CAPTION: Picture, RENE LEVESQUE . . . gets clear mandate