Being able to extract a private key from ssh-agent's PR_SET_DUMPABLE=0 process would be a kernel bug; if you're sitting on such a vulnerability, please consider reporting it.
So the malware modifies your environment to LD_PRELOAD something into ssh-agent instead on your next login? Stuff that runs inside your own session is inherently vulnerable to malware inside that, even if ptrace protections are a speedbump.