Comes from the German word <i>Dreck</i> meaning rubbish or dirt. So it may be used in Yiddish too, but it comes via German, and if it has been extended to mean shit this is not the original German meaning (or I wouldn't have learned it in German class!)
This is dreck.
Entschuldigung, die Dusche hier ist dreckig. Wird es nicht täglich gereinigt?