The apparent conundrum in the OP's question is readily resolved by observing the rules about what "all" means in each situation.
πᾶς, πᾶσα, πᾶν (= all, everyone)
In Greek, as in English, the adjective "all" is not absolute; that is "all" means every thing in a specified or implied class. In 1 Cor 14:31 we have:
For all are able to prophesy one by one; so that all may learn
and be exhorted (my translation)
The second "all" is obviously all in the congregation meeting at the church at the time of the meeting. This much is easy.
The first "all" is more nuanced, but is ultimately defined by the surrounding verses as all the prophets in the congregation.
V29 - Two or three prophets should speak, and the others should weigh
carefully what is said.
V32 - The spirits of prophets are subject to prophets.
There is no suggestion here that the first "all" means all the people in the congregation. Thus, we might interpretatively translate V31 as:
For all [prophets] are able to prophesy one by one; so that
all [congregants] may learn and be exhorted (my translation)
Thus, there is no suggestion here that all congregants could or should be prophets. This is obviously the view of others as well such as Ellicott:
(31) For ye may all prophesy one by one.—Better, For it is in your
power all to prophesy one by one. How it is in their power is
explained by the following verse. This orderly prophesying will
accomplish the instruction and comforting of all;
Gill reaches the same conclusion:
For ye may all prophesy one by one,.... Not every member of the church, but everyone that had the gift of prophecy; so that they were
not confined to two or three prophets at a meeting, but as many as
would, or as had anything to deliver, and as time would allow; only
care must be taken that confusion be avoided, and order preserved by
exercising in turns one after another.
Similarly, the Cambridge commentary is similar:
- For ye may all prophesy one by one Not necessarily at the same meeting of the Church, which would be in contradiction to what has
just been said (1 Corinthians 14:29), nor that the permission was
extended to the whole Christian body. All were not prophets, the
Apostle tells us (ch. 1 Corinthians 12:29), and it is clear that none
but prophets could prophesy, since prophecy (ch. 1 Corinthians 12:28,
1 Corinthians 13:2, 1 Corinthians 14:1; 1 Corinthians 14:5; 1
Corinthians 14:22) was a special gift of the Spirit.
The Pulpit commentary is also similar:
Verse 31. - Ye may all prophesy; rather, ye all can; that is, "if you
have the gift of prophesying." St. Paul has already implied that at
every assembly there would be idiotal, unendowed worshippers, who only
came to profit by the gifts of others, and that "all" are not prophets
(1 Corinthians 12:29). May be comforted; rather, may be exhorted or
cheered. 1 Corinthians 14:31