I have produced small amounts of counterfeit money, I keep this in a few wallets in a few rooms in my house. When going outside I always have one such wallet with me in case I get robbed. Is using counterfeit money for this specific purpose legal?
Since you don't say which country you're in, it's likely that you're interested in United States law.
You are probably in the clear here, though you're getting close enough to the edge of breaking the law that I wouldn't be confident about not being prosecuted and/or convicted. The relevant laws in this case appear to be 18 USC 471, 18 USC 472, and perhaps 18 USC 514. All three of them begin "Whoever, with the intent to defraud...". It's questionable whether creating counterfeit money as a burglar decoy counts as defrauding the burglar.
Counterfeiting is a crime for its own sake. There are no exceptions in any law that I've checked (though this was not exhaustive) for "defence against theft" when compared with crimes like assault or battery or homicide, where one may sometimes use the "defence against physical harm" or in some jurisdictions "defence against unlawful entry to property" defence.
If you are found with the counterfeit currency by an authority, it is unlikely that your story will hold up, in the absence of compelling evidence otherwise, and you should not be surprised if you are charged, let alone found guilty of some crime related to this.