Can Necrozma fuse with Pokémon other than Lunala and Solgaleo?
Necrozma is described as absorbing the "light" from Lunala and Solgaleo. This is supposedly the same "light" that created Mega Crystals and such.
Therefore, could Necrozma absorb other Pokémon, such as Rayquaza? Not only is Rayquaza legendary and therefore would have more of the life energy that created the Superweapon (that created the Mega Crystals), but Rayquaza then ate an asteroid full of Mega Crystals. That's why Rayquaza can Mega evolve on command.
Therefore, can Necrozma absorb other legendaries and mega Pokémon?
Note, I'm asking about the plot/lore of Pokemon, not gameplay-wise.
First, to clarify, Mega Crystals do not exist in Pokemon lore. The OP appears to describe this as a false amalgamation of Z-Crystals and Mega Stones, which are completely distinct items.
Mega Stones are focused on in Gen 6. They are described as originating as Evolution stones irradiated by either Xerneas or Yveltal. Rayquza does not need a Mega Stone to evolve, but rather is able to use the energy from consumed Meteorites to Evolve.
Z-Crystals are focused on in Gen 7. Though the origin of these items is unclear, Z-Power has been linked to the energy from Ultra Wormholes and Necrozma's light. This is not clearly the same light that Lunala and Solgaleo emit, though they are capable of generating Ultra Wormholes.
Returning to the question, though Necrozma can fuse with Solgaleo and Lunala, there is no known record of it ever fusing with another Pokemon or being capable of doing so. Necrozma is capable of absorbing light, which may explain why it can fuse with Solgaleo and Lunala as they emit lots of light. However, absorbing light does not necessarily mean Necrozma can absorb Pokemon that emit light. This is a separate phenomena from Mega Stones, and I would not assume that it can absorb other legendaries and Mega evolutions on this basis.
I would assume Necrozma cannot absorb other legendaries and Mega Pokémon, simply because there is no record or definitive evidence to suggest it can.
As mentioned: Necrozma can only fuse with Solgaleo and Lunala.
To build on this, Necrozma, Solgaleo, Lunala make up the "Light Trio." These Pokemon (and their pre-evolutions) can both create and destroy Ultra Wormholes.
Quote from Bulbapedia (Article: Light Trio):
According to a book called "The Light of Alola" found in Malie Library, a SolgaleoSUS/LunalaMUM appeared in Alola many years ago through an Ultra Wormhole.
(Article: Ultra Space)
In ancient times, Necrozma's light shone through the Ultra Wormholes connecting to various worlds such as the Ultra Beasts' homeworlds, Ultra Megalopolis, and the Pokémon world, primarily over the Alola region. However, following an incident with the residents of Ultra Megalopolis years ago, Necrozma's body was damaged and it lost the ability to produce light, the agony caused by its injuries sending it into a berserk state where it constantly hungered for light.
From these connections, the energy Necrozma absorbs seems to be connected to the ability to create Ultra Wormholes as well as produce light. From my guess, Necrozma can only absorb powers that it knows how to use. Since Necrozma shares a few abilities with Solgaleo and Lunala, it would seem that they are the only Pokémon he can fuse with.
I would assume Necrozma could also fuse with Cosmog if so desired, but the benefits would be so minimal it would be basically pointless.