When a site links to another it passes that site some of its authority and SEO benefit. Only links that are 'follow' will do this, a nofollow link will not. These values are set by the site owner, often on blogs etc all links are set to nofollow to avoid comment spam where people are trying to get links to their site.
If your comments and links are relevant and add value to an article by all means comment and drop a link, you will be able to check if they are no follow or not to. This post by Rand, although not written to answer this specific question, is useful to illustrate the difference between these links and their relationship in passing link juice.
A higher domain authority site as a rule of thumb is generally better yes, but there are other important factors involved that Google will take into account, then there are considerations about having a link in the comments section as opposed to elsewhere on a page. Again i recommend a read through this post by Rand, Not all links are created equal.
The two articles above should help familiarise yourself with the nuances of link building and the more advanced issues, but if you would like a simple yes no answer then yes, leaving a link in the comments section of a article that is a follow link, can help your SEO. But use this tactic as one part of a balanced link building strategy.