That used to be pretty common, back in the day. Stan Lee, obviously. There were some editors who also wrote. Jack Kirby, during his '70s work with Marvel, got a deal where he he was writer, artist and editor of all his books. Those books were fucking awful, which may be why Marvel started moving away from that.
X-Men X-Pert, my blog where I talk about X-Men comics.I was curious, so I looked up the credits for Secret Wars. Tom De Falco was the editor of that series. Shooter was Editor-In-Chief, but he still chose to use another editor when he was writing his own work.
I think that's a wise decision. A writer needs to have that person saying, "Dude, no, that's stupid. Why would you do that? Change it." Without that external feedback, a writer is going to have a tougher time separating the good ideas from the bad, even if the writer is also an editor.
Shooter had in place a policy that editors should also write. But they didn't edit the books they wrote. I suspect it was probably a way to make the editors better editors, by making sure they knew what it was like on the writing side. Which is actually kind of a neat idea.
X-Men X-Pert, my blog where I talk about X-Men comics.No, the editor can totally say how the writer should change it; the writer can refuse to change it, but then the editor is free not to publish it. It's also not uncommon for the editor to flat-out rewrite all or some of the script.
Ukrainian Red Cross
This kind of thing leads to terrible stories, though. It is just my uneducated opinion, but I feel the editor should work as a filter. The writer writes and the editor selects and deny what they think do not work. An actual good editor might work together with the writer giving ideas and complementing the story, but still giving the writer the control of the creative imput. If the editor just overwrite the writer, than the whole point of the relationship is moot.
I don't know exactly how it works within comics, but within written works (both books and magazines) there are several types of editors.
First are the ones than can be called "marketing editors". They are usually the top deciders: they decide which stories to publish, which writers to hire, how to markets the books (covers, titles, and so on). Often they are the "executive editor". In shared-world settings they might be responsible for setting out the main arc and perhaps also write the most important episodes.
Then there is a common type that I'm not sure has a specific English word, an editor who reads new manuscripts in order to give purchasing recommendations and provide feedback to the writers on the story.
Then you have copy editors, whose job is to turn a finished manuscript into a publishable manuscript: check for consistency errors, makes sure the typographer has all the things needeed for typesetting, fix spelling and grammar, and so on.
Then you have the line editor, whose job is to make sure the typeset text is correct and doesn't contain any errors, and to run any last changes to the author.
In comics the situation is probably even more complex.
In practice, there have been plenty of writers who has acted as their own executive editors. Joss Whedon and Russell T Davies are both examples within the TV industry, and Stan Lee certainly was one in comics. But they probably relied on having other hired editors to provide feedback on their own texts.

Could someone fill both roles? Since even though the writer is the visionary, the editor seems to be a secondary version since he/she decides what happens and what's said in it and has final say.