In general, you are correct: in general the editors and reviewers can only make suggestions for changes while only the author actually makes the changes.
In practice, however, good and thorough reviewers (and occasionally editors too) may often make highly specific suggestions for changes (e.g., "Delete this sentence", "Change phrase X into alternate phrase Y", "Cite papers A, B, and C"). Authors are strongly motivated to accept these changes in exactly or close to their stated form, for two reasons:
- Doing so is likely to please the reviewer and increase chances of acceptance.
- The reviewer often has a good suggestion and there's little reason to choose an alternate phrasing.
Finally, note that in some cases copy-editors do significantly more than just formatting/grammar-checks/type-setting. In particular, for publications with very broad audiences, it is sometimes the case that the copyeditor will actually significantly modify the words and phases used by the authors in order to make the text more accessible and more in keeping with the publication's preferred "tone." In this case, though, the authors always have a chance to review the suggested changes and make corrections in case they introduce errors, though objections to style may not be accepted by the journal.