I recently got to know that Russia and Belarus have an agreement and Fan ID can be used to transit through Belarus. I want to travel to Belarus after the final on 16 July (flight), spend a night in Minsk and leave for Egypt from Minsk. I'm not really sure if this trip can be carried out if I only have a Fan ID and no Belarus visa.
Yes, you can.
According to official claim of Belarusian MIA, it can be done till 25th of July:
During the period that starts 10 days before the date of the first match and ends 10 days after the date of the last match (from 00:00 hours on June 4, 2018 to 23:59 hours on July 25, 2018), foreign spectators should leave the Republic of Belarus and the Russian Federation without visa processing.
So your night stay on 16th perfectly fits this time slot.