What should be the proper term when someone wants to "give back" to the community
Solution 1:
The way I see it, "giving back" is a short form of "giving something back in return for the help you previously got from the community".
The comment might have a point, it's not as if you are obliged to give anything in return, but one could argue that other people took some of their time to help you when you needed it, and now you are giving back that time.
Solution 2:
It's not really supposed to be a very precise concept. It's meant to invoke a general sense that we all depend on each other's participation in society for our well-being, and that much of what we "have" in many senses may be meaningfully thought of as "given", so that for us to go out of our way to contribute to society at large is, in some sense, "giving back" -- sharing the fruits of our advantages with others, as we received in our turn.
It mostly only makes sense, in the way you're asking about, when one is speaking of "giving back" to society in general, rather than particular people or organizations. Part of the idea is that, at that level, your third case, that you were never given anything, cannot really ever be the case unless your name is Tarzan. For the first and second cases, sure, there's no implication that what you "give back" should or should not resemble anything in particular you were "given".
In its best forms, I feel, there's also no particular implication that this is something you have to or are obligated to do; it's a nice thing to do if you feel it's appropriate. It's saying you want to live in the kind of world where people do things like that for each other. It also has a pleasing element of humility to it; using the term says that one is not sitting on high dispensing charity and favors to the "less fortunate", one is helping others as one was helped.
Solution 3:
As @GreweKokkor said, "give back" implies that you got some benefit from the community to which you're giving. As @chaos said, the nature of that benefit can be somewhat fluid.
An alternative phrase for this concept that I've heard in recent years is "paying it forward" -- rather than "payback", which looks backward to what you got, it evokes a notion of providing a foundation for those who will follow.