The question appears almost unusual. However, nothing is impossible. I think that in the evenience illustrated in the question, the author who decides to be anonimous, has also the right to estblish what to be written about his contribution.
Researcher need not be anonymous as long as the research carried out is legal. Being anonymous in research is shredding ownership or positioning other's for a claim.
The Acknowledgements give an opportunity for the authors to thank people who helped with the study or preparation of the paper. This includes anyone who provided technical assistance to the authors, took care of the animals, or provided reagents or equipment. The authors may want to thank anyone who had helpful discussions with them or contributed less tangible concepts. This is also where the authors may indicate that the results of this study were presented in another form, such as a poster or abstract or at a symposium.
I think that in social sciences, philosophy and other related areas, the option to remain anonymous due to political and socially controversial writings that may adversely impact an individual is not that uncommon.
Research assistant wishes to remain anonymous, what to write in the acknowledgement? (for a case that the main author, has hired an assistant through Elance (an online work outsourcing platform)
You can write: In addition, we would like to thank our colleagues for their help. Still, it is a bit strange that the person wants to remain anonymous.