I develop an app on behalf of a client "XXXX" thas is "not" apple developer. I reference the name of their society, in the app but apple states than i have no rights on this name, so they reject the app referencing 5.2.1.
Does this mean that I can publish this app under "my" company's name ("yyyy"), remove all the references to "XXXX" (name, icon...) and then it will be accepted in the apple store??
If you remove one reason for rejection there is no guarantee that there will not be other reasons for rejection.
You can either remove references to company XXXX or you can supply documentation showing that you have permission to use the copyrights and trademarks of XXXX.