President Tito of Yugoslavia yesterday warned of the danger of a new world war because of what he described as the breakdown in detente.

In a sombre mood as he addressed the opening session of the 11th Yugoslav Communist Party Congress, the 86-year-old elder statesman of the nonaligned movement said suspicion and mutual distrust between the United States and the Soviet Union reminded him of the days of the Cold War. He called on the leaders of both countries to mend their relations in the interests of the entire international community.

An expression of deep concern over the effects of steadily worsening East-West relations, particularly in Africa, was the main point in a speech which many observers are describing as Tito's political will and testament to the party he has been leading for the last 40 years.

He voiced support for the independent minded Eurocommunist parties of Western Europe in their conflict with Moscow and ridiculed speculation over the future of Yugoslavia after his death.

"Detente in relations between the great powers has broken down. Their negotiations have been suspended . . . the threat of an outbreak of war not only at a local level but even on a world scale cannot be excluded," he told over 2,000 delegates attending the congress from all over Yugoslavia.

Tito also accused the big powers of interference in the Third World, particularly in Africa. And in a passage evidently aimed at President Carter, he added: "Even the question of human rights is being used as a weapon in bloc confrontation and intervention in the internal affairs of independent countries."

As in other Communist countries, the present congress of the Yugoslav League of Communists - the first since 1974 - is a carefully stage-managed affair. Ostensibly the party's supreme policy-making body, its main importance is as a platform from which Tito can publicly chart Yugoslavia's independent course.

Ever since designing a marshal's uniform for himself while leading a partisan uprising against Nazi occupation in World War II, the Yugoslav leader has paid enormous attention to the outward symbols of political power. The symbolism underlying the present party congress, which many Yugoslavs believe will be Tito's last, is as powerful and well-directed as ever.

At the start of the meeting, Tito appeared alone on the huge podium to thunderous applause from the delegates. Tanned and resplendent in a white suit, it was as though he personified the legitimacy of the Yugoslav revolution and its independent path to socialism.

Then his close friend and most likely successor, Edvard Kardelj, read out the entire list of 135 leftwing parties represented at the congress - reflecting the belief that good relations with as many countries as possible is the best guarantee of Yugoslavia's future independence.

Most symbolic of all was the choice of June 20 to open the congress. It was exactly 30 years ago that the representatives of the world Communist parties, gathered in Bucharest at Stalin's instigation, decided to expel Yugoslavia from the Soviet bloc of Tito's refusal to take orders from the Kremlin.

The decision was formally announced a week later to an astonished world - the first split in what was until then a monolithnic movement. Ironically the signatories of that resolution included the leaders of the French and Italian parties, now the foremost exponents of Eurocommunism.

Yesterday Enrico Berlinguer, the present leader of the Italian Communist Party, nodded with approval as Tito defended the principles of independence and equality between Communist parties - and rejected the Soviet idea that a single historical experience like the Russian revolution can have universal significance.

Also revealing was the enthusiastic applause with which Berlinguer's name was greeted in the hall. It was noticeably warmer than that accorded to the Soviet representative, Fyodor Kulakov, who is a full Politburo member and sometimes mentioned as a possible successor to Leonid Brezhnev.

The delegates also loudly applauded a message from the Chinese Communist Party citing "Yugoslavia's determined battle against hegemonism" - a codeword for Soviet domination. In effect it amounted to the formal reestablishment of relations between the two parties suspended 20 years ago when the Chinese accused Tito of being the world's arch-revisionist. Today they number him among their closest friends.