Possibly.
A super tanker like this …

… produces a lot of noise and, in open water, tends to maintain a pretty steady course and speed. Having determined that course and speed, and estimated the keel depth of the ship, it would be possible for a nuclear submarine to match course and speed under the vessel with a sufficient depth separation for safety.
The noise of the tanker would tend to mask the acoustic signature of the submarine unless the submarine was putting out some very distinctive tonals. The bulk of the tanker would also defeat any attempt to detect the submarine using active sonar as the two echoes would be indistinguishable from each other on the sonar set.
The submarine would equally be deaf to any other shipping in the vicinity although it would be able to detect active sonar transmissions. The submarine would also be relatively safe from attack as the torpedo could easily be seduced by the large bulk of the tanker – even if the safety ceiling was below the tankers draught.
It is not a great tactic to be employed by a submarine except in extremis and submarines tend to rely on stealth technology and exploitation of water conditions to avoid counter-detection.
