And there John is speaking of God's work (singular). Paul in Rom. 2:6-7 is referring to our works (plural). God/singular v. us/plural. They are not speaking to the same thing.
For a hint as to what Paul is addressing, see the parallel phrasing "God will render according to works" by Jesus at Matt. 16:27 and the elaboration on that point at Matt. 25:31ff.
Romans 2:6 is talking about rewards for what has been accomplished on God's behalf. That would be after they have been saved. I don't think anyone would disagree that Christians are going to be rewarded at different levels. Matt. 16:27 specifically uses the word in Greek that means deeds or actions and is talking about rewards which have nothing to do with salvation.
John 6:28 - Therefore they said to Him, "What shall we do, so that we may work the works of God?"
If you have to do the works as part of your salvation ... then there can never be pure motives in doing them ... there is always a selfish aspect to it. You do them because you have to ... without them you don't make it.
Freedom in Christ is doing the works knowing we don't have to ... we want to ... we want to share the gospel with others, we want to study the scriptures, we want to help the poor ... not because we must ... but because we can now do it without selfish motives ... our motives at least have the potential to be selfless.