No, there was a UA in WWII. It was a boat originally built in Germany for the Turkish navy and seized at the start of the war. It was actually quite successful, even with a much different design from the German U-boats
http://uboat.net/boats/foreign_ua.htm
However it's definitely not the boat in Das Boot.