The funny thing is that I first heard this quote reported to be my an atheist (who had no reason to make this up), except that he didn't mention the part about going to heaven, probably because he has no interest in it (and doesn't believe it's there any way).
I’ve heard atheist here on FR say that they can do good, without believing in God.
I don’t see why not.