Until 1991, the surface navy did carry nuclear weapons, e.g. cruise missiles, nuclear anti-air missiles, nuclear depth charges, and tactical nuclear weapons for aircraft on aircraft carriers. In 1991 these were offloaded, but until 2010 the attack submarines still had the capability of carrying nuclear cruise missiles (the nuclear tomahawk), although the missiles themselves were in storage. [1]
I still remember the 1980s when American navy ships visiting Europe were generally assumed to carry nuclear weapons (and caused protests), it was not so long ago.
[1] https://fas.org/blogs/security/2016/02/nuclear-weapons-at-se...