Answer to your question
You need rep to be able to comment. As you use the site (by asking and answering questions), you gain "reputation" depending on the votes you recieve. At 15 rep you can upvote a post, and you can comment on all (non-locked) posts at 50.
Answer to your situation
SO is not a forum. The "answers" aren't "replies", they're answers. Similarly, comments aren't really for "thanks!"/etc, they're for asking for clarifications and making suggestions for improvement. Neither is editing for this purpose (as you have realized). Casting an up vote on the post is the best way to give thanks within the framework of this site.