I found a reference to a WWI submarine (SM UC-44) doing this here.
"Two aspects of her service are noteworthy. UC-44 was the first submarine to use the tactic of releasing oil and debris from her torpedo tubes to fool the enemy into believing it had been sunk by depth charges."
"During a particularly intense depth charge attack on 15 February 1917, Kapitanleutnant Kurt Tebbenjohanns, UC-44's commander, ordered that the vessel's front torpedo tubes be filled with waste oil and other debris, then fired, simulating what might have been expected to reach the surface had the submarine sank. The ruse worked, and the attack was ended, allowing UC-44 to escape. Other U-boat commanders, and eventually their counterparts in other navies, adopted this deception tactic. It was particularly effective for the Germans at first, as British commanders were easily satisfied that they had sunk the enemy."
In regards to WW2, in the book Black Company: The Story of Subchaser 1264 by Eric Purdon the author writes, "Kaptain Gunther Pfeffer ... tried every trick to avoid his pursuers. He released the Pillenwerfers, chemical air bubbles that remain suspended at depth... He, evaded by quick turns, doubling back, sudden dives and releasing oil and debris to make the Americans think they had sunk him."
And I found another mention of it being a tactic but not an actual case use in The USS Ward: An Operational History of the Ship that Fired the first American Shot of WWII. Author Richard Klobuchar states, " Submarine commanders were known to deliberately release fuel oil to deceive attackers into believing a submarine had sunk."
I am fairly sure I have read about this is a few other books, I will go through them this weekend and try to get a better answer.