Lets look back at the beginning of the story. He obviously thought Christ was God because he asked Jesus what do I need to do to enter into life. Jesus answered and started quoting directly from the Ten Commandments . Here's the beginning of the story:
Matthew 19:16 Now behold, one came and said to Him, “Good Teacher, what good thing shall I do that I may have eternal life?”
17 So He said to him, “Why do you call Me good? No one is good but One, that is, God. But if you want to enter into life, keep the commandments.”
18 He said to Him, “Which ones?” Jesus said, “‘You shall not murder,’ ‘You shall not commit adultery,’ ‘You shall not steal,’ ‘You shall not bear false witness,’ 19 ‘Honor your father and your mother,’ and, ‘You shall love your neighbor as yourself.’ 20 The young man said to Him, “All these things I have kept from my youth. What do I still lack?”
This goes back to my point that the rich man knew about the commandments claimed he kept them from his youth, but wasn’t keeping all of them because he was breaking the first commandment Exodus 20:3 “You shall have no other gods before Me.
This does not say have no other Baals gods. It says no other gods which is anything you place above God. So I did not exegesis.