You would need the second post to be able to mark that one as a solution. It’s not currently possible to have a solved topic that consists of only the OP.
Manually cutting and pasting the edited portion with the solution into a second post would be the best workaround if you wanted to keep a strict ‘Solved’ format for every case.
You can change ownership of the second post you add to reflect the answer being from the right person, which also allows you to avoid quoting (which would be stripped out of the embedded solution that’s added to the OP).