On the fifth anniversary of its last war with Israel, Egypt put on its annual display of military power yesterday, massing 6,000 troops and a third of its armor at this desert base for ceremonies that led to new speculation about the armed forces'future role.

Mirage-3 jets tralling colored smlke looped overhead as President Anwar Sadat and the new minister of defense, Lt. Gen. Kamal Hassan Ali, rode in an open jeep through the ranks of tanks, armored personnel carriers, missiles and artillery pieces.

More than 200 planes, including Soviet-built Mig-21 fighters that have been refitted with British engines since Sadat's break with Moscow, flew low over the troops from the 2nd and 3rd Field Armies standing at attention on the buff-colored sand.

This display of about 600 tanks, Soviet-built antiaircraft missiles and recently acquired helicopters from Britain and France served as a reminder that Egypt still is the most powerful military machine in the Arab world. But it is not he same machine, in equipment, leadership or mission.

The day of Soviet-trained Egyptian forces armed with the latest weapons for desert warfare against Israel is over. The Soviet-built tanks are aging and Egypt has no source for new ones. The missiles are said by military experts to be nearing the end of their useful life.

The most advance planes in the air force, the Mig-23, which were displayed in last year's ceremonies, did not participate yesterday. The reason, according to military sources, is that none of the 24 aircraft is operational, also missing were the boats, frogmen and pontoon bridge builders who have taken part on previous anniversaries - an absence that was symbolically appropriate because their mission was to cross the Suez Canal to fight the Israelis.

Invitations to yesterday's event were issued in the name of the former war minister, Gen. Mohammed Abdul Ghani Gamass. But he was replaced Tuesday by Ali, whose title is now defense minister, and it was Ali who delivered the traditional address to the troops.

In it, he gave striking clues about the role envisioned for the Egyptian military in the future. Speaking a day after Israeli gunboats shelled Lebanese areas held by Egypt's former allies, the Syrians, Ali noted that armed conflict is no longer the means by which Israeli and Egypt will settle their disputes.

Praising the Camp David agreements as the beginning of an ear of peace, he said the armed forces are "ready to help in developing the country's economy and reconstruction." He also said the troops must stay trained and equipped for future missions, including missions in Africa.

The reference to Africa came as no surprise to military observers here. They have been reporting a gradual shift in Egyptian military emphasis away from massive desert conflict with Israel toward more limited strike operations to protect Egypt's interests to the west and south.

Last year's border clashes with Libya and Egypt's military aid to the government of Zaire during the invasion of this policy, evolving from Sadat's vision of Egypt protecting itself and its friends in Africa from communist inroads.

Military experts say the way the armed forces are being equipped reflects this shift in their role. With the missiles going out of service and with no new tanks comming in, the equipment that Egypt is getting seems more useful for a new kind of warfare.

The C130 Hercules transports that Egypt is acquiring from the United States, military sources say, would be nearly useless in war with Israel, but give Egpt the ability to airlift troops and equipment to the Libyan border and around Africa.

The same is said to be true of the 50 F5E jet interceptors that Egypt has ordered, also from the United States. These planes would not stand a chance against the Israeli air force, but represent a potent force in the context of Africa.

Egypt still maintains a standing army of about 350,000 men, mostly draftees. Military observers here predict that this will gradually be trimmed down, perhaps to about 200,000, and that it will become an all-volunteer force.

That would require salary increases for the troops, as well as new equipment, which probable means that the over-all level of military expenditure is unlikely to decline much, if at all.