Why does Riker not have to be Admiral to command a fleet in the last episode of Picard?
I would have expected that he gets a field commission and is, during having this, addressed as Admiral.
Being a Starfleet Admiral doesn't appear to be a pre-requisite for being granted command of a fleet of ships.
In DS9: Sacrifice of Angels, Captain Sisko is appointed to lead the fleet (comprising elements of the Second, Fifth and Ninth fleets) conducting "Operation Return", retaking Deep Space Nine and the Bajoran wormhole. This fleet is one of the Federation's largest ever engagements.
SISKO: By putting together a task force comprised of elements from the Second, Fifth and Ninth fleets, I believe that we can retake Deep Space Nine, the most important piece of real estate in the quadrant.
In TNG: Redemption, Part 2, Captain Picard is given direct control of a sizeable fleet of ships. Again, there's no mention of him receiving any sort of temporary promotion.
SHANTHI: I'll have to clear this with the Federation Council. In the meantime, assemble your fleet, Captain.
There are other examples, but these seem most relevant.
The problem here is a matter of POSITION, vs. a matter of RANK.
One can command a fleet, or in current wet navy parlance, a "task group" or "task force". That is a position.
One can be the rank of a captain, or admiral, or whatever. That is a RANK.
The two are NOT THE SAME.
In current US navy, TF-55 (aka DESRON destroyer squadron 50) is commanded by Captain Adan Cruz (as of April 2020). But TF-55 also has patrol boats and other coastal patrol vessels and basically guards the Persian gulf area.
So, no, you do not have to be an admiral to command a fleet of ships.
Of course, the idea that a RETIRED captain (or low-ranking admiral) can just jump back and command "Federation's newest" starships and zoom, just show up like that, is a bit... WTF