well, that's the whole joke, isn't it? their interchangeability?

Hmmm, maybe in "the law is an ass", eta, but I can't think of another example where both meanings could apply. "A pain in the ass" would always mean "arse", for instance.

"Ass" (=oaf/fool as well as donkey) certainly softens any associated phrases, though, even in cases where the less offensive meaning doesn't apply. A bit like "Jeepers Creepers" (or "Jeez Louise", as mentioned in Q&A) - an imaginary fig-leaf.