I suppose in this sentence "any" means "all" and/or "every" reference occured in DEF_2 and DEF_3.
One shall remove any reference to those items in DEF_2 and DEF_3.
Is this correct?
I think that the use of "any" in your example sentence is "correct", but your use of "shall", while not incorrect by any means, is the culprit leading to confusion.
Consider the following variations, as I believe they shed light on the interpretation of the original sentence:
I believe the lack of clarity is not with the the word "any" but rather with the context established by the (weakly) imperative tone of "shall". This becomes clearer when we replace "shall" with "should". It would more difficult to misconstrue how many references to remove when you are told you should remove any. Stating that one "shall" remove any is a bit murkier. Are you telling us that we should? Or are you wagering that we will?
Even though the implication may be as you stated, we cannot possibly use all or every, only any in the sentence, because there may be none.
To provide for the possibility of there being none, we have to use any in the sentence.