Implications of the KM3NeT ultrahigh-energy event on neutrino self-interactions