A publisher will typically require authors to sign a contract. That contract dictates what the publisher can do.
Contracts typically stipulate that the publisher can make editorial, formatting, stylistic, ... changes. Thus, a publisher can alter or invent writing. Whether the publisher can do so without consulting the author depends on the contract.
A contract might permit the publisher to derive promotional materials bearing the author's name, without further consultation with the author (i.e., contracts might grant such rights), hence, it might be legal to publish a document under an author's name without consultation.
Since the publisher is typically granted permission to make changes, it is possible that those changes lead to publication of a manuscript that is radically altered to the extent of say the opposite of the original.
Although I have reasoned that it is possible, it really depends upon the contract that was signed.