Witnesses said they saw the vessel surface on Saturday as tensions between Spain and Britain continue to rise over fishing rights around the Mediterranean enclave.
The sighting comes days after Royal Navy warship HMS Westminster arrived in Gibraltar.
A spokeswoman said if it was in Gibraltar then it was for 'routine business'.
The Sun quoted an 'insider' as saying: 'There is only one reason a submarine breaks the surface - and that is to be spotted.'These things do not show themselves unless they want to be seen.'
The website shipspotting.com reported that HMS Tireless - a Trafalgar-class nuclear submarine - was seen in Gibraltar in Z Berth last month.
Local news in Gibraltar reported that HMS Tireless sailed into the area last month for a 'short stay as part of (the submarine's scheduled operational tasking'.
If confirmed, it will be the first time the nuclear submarine has docked in the contested region since 2004.
The docking of HMS Tireless, which is due to be decommissioned this year, sparked protests from Spanish activist nine years ago - the same year as the 300th anniversary of the capture of Gibraltar from Spain.
The submarine caused diplomatic tensions between Britain and Spain once again in 2000 when it docked in Gibraltar for a year after the submarine developed a serious leak in the nuclear reactor primary cooling circuit.Another Trafalgar-class submarine, HMS Talent, stopped in Gibraltar this year and the enclave's first minister Fabian Picardo and his deputy Dr Joseph Garcia were given a tour.
Tensions between the two countries have ramped up this year over fishing rights.
Gibraltar's creation of an artificial reef with concrete blocks has provoked fury from Spanish fisherman, which they say blocks their access to certain waters.
Spanish police were criticised last week when they unfurled a Spanish flag during an inspection of the reef. Read More Read More HERE
At least Gibraltar is BRITISH , unlike Syria, concentrate on our interests, the only reason the Argies invaded the Falklands in 82 was because they thought we wernt bothered about a small pile of freezing rocks in the South Atlantic. Now Spain go and ask your amigos in Argentina what happened to them when they stuck their noses into our business?