In my opinion, usually not. Not unless the foreign speaker is almost accent-free and has lived among native speakers for perhaps ten years and is well-attuned to the culture. Idioms and slang definitely should be part of your passive vocabulary, but not your active vocabulary.
Even among native speakers, slang does not help to communicate meaning. It does things like communicating nuances of emotion, or signaling group membership. Think about old people trying to use young peoples' slang in order to fit in better. It usually doesn't work, they just sound silly.
Unlike "straight" classroom English, slang and idioms need to be delivered with exactly the right pattern of rhythm, stress, intonation, and body language or they _will not be recognized or understood._ If somebody says "Boy, is he ever long-winded and boring!" and someone else says "TELL me about it," it means "I strongly agree." But if someone were to say "Tell ME about it," it would just be completely puzzling.
Using certain Yiddish words ("I was schlepping the kids to school") would be understood within a hundred miles of New York City, or by people who listen to television programs set in New York, but possibly not in Milwaukee.
"Bad words" are a minefield. Just because you hear the F-word used all the time on YouTube or on television programs doesn't mean it's safe to use. It is still a word that can get you fired from your job if you use it the wrong way at the wrong time. What's fine among a group of high-school girls walking down the street together and believing--or pretending--that older adults can't hear them, isn't fine among those older adults themselves. It would be forgiven in a foreign speaker but _only because_ we recognize that the person does _not_ understand our culture.
When teachers don't teach you slang, they are not hiding some magic key to speaking English well. Express yourself in the simplest, clearest way you can; use tone of voice and body language to communicate feeling.