You should always try to ensure that your answer is factually correct.
If your answer says that X cannot do Y, and it later turns out that X can in fact do Y, you should update your answer to reflect this new information. This applies to all answers, but especially so to accepted ones.
That said, as long as your answer presents a valid solution, even if you believe it to be an inferior one, it's still a valid answer. Some users might legitimately prefer your solution to others, or feel that it provides a useful addition to the other answers. Instead of unnecessary self-censorship, it's better to let the OP and the community judge the relative merits of the answers via voting and accepting.
If you really feel that your answer is giving undue prominence to a poor solution (whether due to being the accepted answer or otherwise), you can always edit it to:
- mention that a better solution (in your opinion) exists, and that you're only providing your solution for the sake of completeness and historical record;
- provide a prominent link to the answer that describes the better solution; and
- clearly describe any disadvantages (and advantages!) of your solution.
Indeed, this is exactly what I'd recommend doing in your specific case here: fix the incorrect impossibility claim, provide a link to Tim Grant's answer explaining how to do it, and keep the alternative solutions in your answer for completeness, as they seem to have been useful for the OP.
(You could also simply ask the OP to unaccept your answer, but it looks like you and nitsua60 have already done that.)
What you generally shouldn't do, as mxyzplk notes, is simply copy another answer into yours. Even if you correctly attributed the copied solution to its original author, and even if you marked the copied answer as community wiki to disavow any rep gains from it, doing that would still result in two essentially identical answers to the same question, which we don't really want.
That said, in some cases quoting a brief excerpt from another answer (with correct attribution, of course) may be useful. Off the top of my head, I can't think of a good example of such a situation here on RPG.SE, but e.g. on Stack Overflow it could sometimes be reasonable to quote a short piece of code from another answer, to illustrate a better or more general solution to the problem, before describing an inferior or more specialized alternative solution.
As noted above, you also generally shouldn't delete a well received answer unless it's factually incorrect and fundamentally unfixable, or unless fixing it would essentially turn it into a copy of another answer with no originality left.
If you did believe that your accepted answer was clearly and objectively wrong, and impossible to fix without turning it into nothing but a copy of (or a link to) another answer, you could technically flag it for moderator attention and explain the situation in a custom flag. Although even moderators cannot unaccept an accepted answer (except on their own questions, of course), they can delete an answer even if it's accepted.