As you say, if the cap/shoe fits, wear it does not mean the same thing as the negated statement if it's not your shirt, don't put it on. This particular translation appears to be a common problem among Hungarian - English free online dictionaries (EUdict, bab.la), which may be borrowing from similar sources of information like this 2006 Hungarian English Dictionary. You are right that it sounds peculiar.
You could try to invent an expression out of the existing idiom, like so: if the shoe doesn't fit, don't wear it. If the shoe doesn't fit doesn't even show up in Google Ngram, though there are a few attempts at if the shoe doesn't fit in a general search. For example, I found a quote attributed to Gloria Steinem: "If the shoe doesn't fit, must we change the foot?" (this appears to be from her book Outrageous Acts and Everyday Rebellions). In context, Steinem questions why the first impulse is to change ourselves or our bodies rather than the labels (the shoes) applied to us. That's not quite what you describe the Hungarian idiom as meaning either, since no personal or systemic change is necessarily implied in not putting on a shirt.
An expression that comes closer is not my circus, not my monkeys. While several articles, like this one from the Telegraph, have attributed it to Polish, I've heard the phrase used several times in American English to suggest a situation where someone is not obligated to respond because it is not their responsibility (their shirt?). Online uses suggest the phrase may be comprehensible enough to title or frame an article. For instance, Margaret Wehrenberg uses it in a Psychology Today article, "Not My Circus, Not My Monkeys," as a way of letting go of what's not ours to control. Nick Burnett, in "My Circus, My Monkeys," cites it as "a well-known idiom, of Polish descent." And Josephine Holmes, in "Not My Circus," narrates the following:
I was benignly complaining about a task I thought I should take on, one I was considering. The thought had been causing me more than a little angst. After bemoaning this briefly, these words popped out of my mouth: “Not my circus, not my monkeys.”
Again, this isn't exactly like the Hungarian idiom, since that is more focused on criticism than responsibility. That said, at least this expression captures the benefit of avoiding a burden that we otherwise might take on.