In Luke 18:18-23 Jesus answered the question, "What must I do to inherit eternal life?" by telling the rich young ruler to keep the commandments (v. 20). Does this statement support the idea of salvation by grace plus works?
No. There is no evidence here or elsewhere that Jesus taught that good works are a condition of salvation. This is clear for a number of reasons.
First of all, Jesus' answer was not intended as a plan of salvation but as proof of the young man's condemnation. The law does not save (Romans 3:28), but it does condemn (Romans 3:19). The "law was put in charge to lead us to Christ that we might be justified by faith" (Galatians 3:24). Jesus was trying to demonstrate to the young man that he stood condemned before the law. His unwillingness to give his money to the poor revealed that he had not even kept the first great commandment to love God more than his money or anything else (cf. Matthew 22:3637).
Furthermore, even the rich young ruler's question was confused. For one does not "do" anything to get an inheritance of any kind, including eternal life. An "inheritance" is a gift. Indeed, eternal life is presented throughout the Bible as a gift (Romans 6:23; John 3:36; 5:24; 20:31; 1 John 5:13). And one cannot work for a gift. As Paul said, "Now when a man works, his wages are not credited to him as a gift, but as an obligation. However, to the man who does not work but trusts God who justifies the wicked, his faith is credited as righteousness" (Romans 4:45). The only "work" by which someone can be saved is "faith." For when Jesus was asked, "What can we do to accomplish the works of God?" Jesus replied, "This is the work of God, that you believe in the one he sent" (John 6:29).