I'm pretty sure that the Necrozma forms are ultra beasts. Why wouldn't they if the game is called ultra sun and ultra moon?
Necrozma is not an Ultra Beast (at least not right now anyway, yet to be seen if USUM will declare it one). Solgaleo and Lunala are but since DM and DW are forms of Necrozma (like BW Kyurem) then they're not Ultra Beasts either.