It's a direct translation of the German phrase "Es tut mir leid," and it's widely understood by Yiddish speakers.
There are other, more informal expressions, such as:
* "Mir iz leid" (meer iz layed) - Literally "It is sorry to me."
* "Ich bin leid" (ikh bin layed) - Literally "I am sorry."
* "Verzeyt mir" (verzayt meer) - Literally "Forgive me."
The best phrase to use will depend on the context and your relationship with the person you are speaking to.