The way I see it, there is a difference between "willpower to resist temptation" and "willpower to resist corruption". The first one is perfectly possible, the second one is a lot harder, downright impossible for most.
Compare it to an ordinary drug almost everybody has tried; coffee. It promises something very simple, you will be able to stay awake better and focus better. For many people this is a reason to start drinking coffee. However, in the long run you will start performing worse without coffee, you will "need" that coffee in the morning to function properly.
Somebody who is aware of this fact may decide not to use coffee, despite the fact that it might offer a (temporary) solution to his problem (staying awake.)
Now consider that the ring isn't something only mildly addictive like coffee, but something with its own, sinister will. Once you have used it, doing something without using it would seem silly. Why do things the hard way when the power of the ring makes everything so easy? Its addictive and corrupting powers are extreme, even if Gandalf were to use the ring for good, it would eventually twist him because the ring only serves one master.
So why do Aragorn and Gandalf have the ability to resist picking up and using the ring, but Boromir does not? Simple; they have a better understanding of what they are dealing with. When you haven't put on the ring yet, you are not yet addicted. The ring can promise you power, a solution to all your problems, but you are under no compulsion to act on these promises.
Somebody who overestimates themselves and believes "they can handle it" (Boromir) will try using the ring for good, not realizing that in the long run, they are going to get addicted and corrupted. Somebody with a better understanding of history / their own limits (Aragorn / Faramir / Galadriel / etc.) will understand that no matter how good their intentions or how noble their soul, they will eventually become corrupted by the ring and start the circle anew.
That is why they needed somebody who could part with the ring after having used it, and that is where the hobbits come in. They are naturally resistant against its effect, possibly because the desire for power does not seem to be something that comes naturally to hobbits. While it is clear that they will eventually succumb to the corruption (see Gollum), it takes a far longer time and the harm they can do with the ring is fairly limited compared to Gandalf or Elrond having the ring, making Frodo the perfect guy to bring the ring to Mordor.