Your other question clears up how normal variant familiar Gazers work, this Q&A is specific to this odd case in the adventure where it becomes summonable via find familiar.
I'm not sure how this makes sense in the narrative of Waterdeep: Dragon Heist, but given the quote you have included in the question, I'm drawn to the part that says:
... turn it into their familiar with a find familiar ritual.
I'm not sure how a real gazer would be... transformed into a spirit for the purposes of find familiar, but looking at the wording, it does appear to be what is happening, since it uses phrases like "turn into their familiar". This sounds different to the wording that would imply that the Gazer has simply agreed to follow you, such as "becomes your familiar" (although the quote does then go on to use that wording).
Also, the fact that it says this:
When the gazer becomes a familiar, its alignment changes to match that of its new master.
implies to me that some kind of change has taken place to the nature of the creature. The "find familiar ritual" that the previous line mentions isn't specified anywhere (it doesn't appear to refer to a standard ritual casting of the find familiar spell, given the phrasing), and there is no lore that I'm aware of that says that a Gazers' alignment switches to match the creature that they agree to serve as a (standard) familiar. This leads me to believe that the Gazer has been changed fundamentally in nature such that it is now a valid find familiar spell (presumably it has been turned into a celestial, fey or fiendish spirit).
Also exploring your other question a bit (in the context of this question), if it were to become a spirit of some sort for the purposes of find familiar, then it would be subject to the rules of the find familiar spell.
A familiar can't attack, but it can take other actions as normal.
The description of the spell says that it wouldn't be able to attack, so this all comes down to whether the Eye Rays action counts as an attack.
The Eye Rays action is listed under the Actions section of the stat block, which usually contains a creature's attacks (such as the Gazer's Bite attack), but is the Eye Rays action actually an attack? It doesn't involve any attack rolls, so it might not be considered as one according to this rule:
If there's ever any question whether something you're doing counts as an attack, the rule is simple: if you're making an attack roll, you're making an attack.
Since all of the Eye Rays options are saving throws, it appears that it isn't an "attack".
However, there is another way to read find familiar - it doesn't say "can't make an attack", it simply says "can't attack".
So, since this is somewhat unclear (to me, at least), it will likely come down to whether a DM interprets this to mean "cannot make an attack (i.e. something with an attack roll)", or "cannot attack (i.e. take an action that causes harm to another)".