My edit was rolled back with a comment saying I wasn't to implement feedback in my code (which makes sense) but I re-instituted it with an explanation that I was correcting an error in the original question--not with the code itself.
If I understand correctly, you already had the code that was suggested in the answer, so from your perspective, you're not implementing a feedback in the answer, you're just replacing the code with what you already had yourself, right?
To be precise, the reason for rolling back your edit is that it invalidates the answer that was already written based on the original version of your code. From the perspective of the answerer and other readers, it's not relevant that you actually had the better version of your code all along.
What's relevant is that somebody took the effort to review what you posted and wrote an answer. If you apply your edit, the answer won't make much sense anymore.
The answer would have to be substantially reworked, or deleted.
That wouldn't be fair to the answerer, would it?
On top of that, maybe I'm overreacting but I feel that a moderator then locking the post with the warning "I suggest you play along" is threatening and completely inappropriate.
Let me quote the exact comment that you are referencing:
Our rule prohibiting modification of the code in the question after an answer has been posted is quite strict; otherwise, there would be confusion over exactly what code we are reviewing. You got helpful advice out of the one answer that has been posted so far, so I suggest that you play along, even if the question you posted was not perfect in your eyes. Until you acknowledge the no-modification rule, this question will remain locked — no further answers or voting will be allowed.
I assure you that this wasn't meant to be threatening.
By the "play along" phrase,
I think he simply meant that he understands your situation that you didn't really use help from the answer (you already had that code),
but since we don't want to be unfair with the answerer,
there is no perfect solution here,
and the least bad solution is to let your question as it originally was.
Am I totally wrong? I want to play by the rules but I feel that the way I originally asked the question was just going to waste my and everyone else's time until the error was corrected.
For one thing, it was you who posted code that doesn't reflect reality.
And the answer was posted more than 12 hours later,
so it's not like there was a very short window to make the necessary corrections.
I'm afraid you should accept some responsibility here.
As for the usefulness of the question.
You have received a vote, somebody cared to answer,
and the answerer received votes as well,
so it seems to me it's already useful.
I would suggest to accept the answer and move on.
I hope this answers your questions and calms your concerns.