The gravitational force exerted by a central planet deforms its orbiting moons (tides) and periodically changes their rotation (librations). Tides and librations of large icy satellites rotating synchronously with their orbital motion are usually studied separately but we here show that tides strongly reduce the libration amplitude of large icy satellites with a subsurface ocean. Moreover, libration also slightly changes the tides. Periodic tides affect libration in three ways: first the periodic tidal bulges modify the gravitational torque exerted by the central planet on the satellite, secondly torques between the periodic tidal bulges of a solid layer and the static shape of another solid layer couple the libration of the ice shell and solid interior, and thirdly, the zonal tides periodically change the polar moment of the satellite, which acts as the inertia for rotational motion. We develop a formalism to include these elastic effects in the study of librations and calculate the amplitudes of the longitudinal librations at orbital period for the largest icy satellites in the Solar System: Europa, Ganymede, Callisto, and Titan. Without a subsurface ocean, elastic effects on libration are of the order of a few percent. However, if a subsurface ocean exists as indicated by several observations for the satellites considered, elastic tides have a crucial effect. If the solid layers of the satellites are considered rigid, the libration amplitude is at least one order of magnitude larger than for an entirely solid satellite. Periodic elastic tidal deformations of the layers, in particular of the ice shell, counterbalance this large increase and keep the libration amplitude at the level of the libration of the satellite without subsurface ocean. Besides gravitationally forced librations, seasonal variations in the atmosphere of Titan also cause the rotation of Titan to change on a seasonal timescale. We show that tidal elastic effects can strongly increase the amplitude of these long-term variations in the rotation rate by a factor of about four with respect to a rigid shell. We predict that these variations can have an amplitude above the detection limit of the Cassini radar.