From your description it does seem that your budgie is overheating.
Are you sure he was actually beak grinding and not panting? There is a difference between these two actions.
If your budgie hasn't been feeling well and has been truly lethargic, then I doubt he was really beak grinding as this is associated with the bird being perfectly well, happy, content and relaxed. When panting, a budgie will successively open and close the beak and during this motion you will be able to see the tongue sticking out a bit. There is no "chewing" or "grinding" beak movements while panting. Panting is another clear sign of overheating, in case you don't know.
If this is an hydration issue, you can offer your Frankie a dripping wet leafy green for him to eat and possibly bathe in. This can also be accomplished with a tiny piece of fruit.
To check for hydration, you will have to look at your budgie's feet and eye areas. The physical signs for dehydration are when the feet seem dry, the eyes have more of a sunken, not as shiny look and the eyelids are more wrinkly looking.
If Frankie is truly unwell and lethargic then it would be best to have him seen by an avian vet specialist as soon as possible.
Until then, and to help with hydration, you can give him water mixed with electrolytes or soak some millet on electrolyte solution.
You will find the details here: https://talkbudgies.com/your-budgies-...te-recipe.html
I hope your Frankie feels better soon.