The only possible answer to your question is don't. You are using memoization where memoization ought not be used.
Only memoize functions which have no side effects, or you're asking for trouble.
Are there any solutions to get a memoizer class to detect that the function modifies an argument?
It isn't the memoizer's responsibility to detect mutability, it is programmer's responsibility to decide whether or not to apply the memoizer to the function.
that way we can note it and save modified arguments
That sounds to me like over-complicating things. Besides, if you "save" modified arguments, you end up keeping references to them, preventing them from being deallocated.