I think there are 2 things that matter.. Every blessing is from God.. That would include financial blessings.. As CeileDe said, where is the heart is what matters.. That is the first aspect.. The 2nd aspect is, how the person became rich.. Now I am going to extrapolate the verse a little.. I am not saying that is what happened.. It is a possibility.. I am wondering if the person actually earned all that richness by cheating people.. Because the first thing Jesus mentions is about commandments.. One of the commandments is do not steal.. The rich man says he has kept every commandment.. So he is not hearing what Jesus is pointing him to.. Then Jesus hits the nail.. Jesus asks the person to give out the money, probably to where it actually belongs.. We can draw parallel to Zacheus.. The first thing he does is, return all the money (many times) which he did not earn in the right way..
So I look at it from 2 perspectives.. Richness coming through wrong ways is never a blessing from Lord.. It brings only condemnation.. Even richness earned through proper ways could potentially make us slaves to the money..
When our heart is right, we would never look forward to bringing money in wrong ways.. When our heart is right, we will never become slaves to money!