Wikipedia claims that the expression И рыбку съесть, и в воду не лезть is equivalent to "having your cake and eating it too", literally translated to wanting to eat a fish without first catching it from the waters.
It references a footnote however, that says that: this is a euphemism for a common vulgar expression и рыбку съесть, и на хуй сесть first used by Alexander Pushkin in a private letter.
I am wondering if it is then ok to use И рыбку съесть, и в воду не лезть, or will it be offensive? Note that the context is rather formal, but I would like to include this phrase in Russian (the rest of the work is in English).