Both my grandfathers were Masons, one an atheist/agnostic, one a devout Baptist.
I suppose the Masons have been an effective secret society, in finance and in politics, for those who have wished to make that use of it. My grandfathers just wanted a night out with the guys, away from their wives.
OTOH many of the Founding Fathers of this country were Masons.
One must believe in a deity in order to be a Mason, heartwood.
So, strike the “atheist.” Your grandfather was agnostic, believing in “a” god, just not necessarily any preconceived notion of that god.