The purpose of the passage, I believe, is to illustrate a much more important point. It's not the purpose of the text to determine if the ruler was saved.
Mat 19:23 And Jesus said unto his disciples, Verily I say unto you, It is hard for a rich man to enter into the kingdom of heaven.
Mat 19:24 And again I say unto you, It is easier for a camel to go through a needle's eye, than for a rich man to enter into the kingdom of God.
Mat 19:25 And when the disciples heard it, they were astonished exceedingly, saying, Who then can be saved?
Mat 19:26 And Jesus looking upon them said to them, With men this is impossible; but with God all things are possible.
Mat 6:19 Lay not up for yourselves treasures upon the earth, where moth and rust consume, and where thieves break through and steal:
Mat 6:20 but lay up for yourselves treasures in heaven, where neither moth nor rust doth consume, and where thieves do not break through nor steal:
Mat 6:21 for where thy treasure is, there will thy heart be also. Mat 6:22 The lamp of the body is the eye: if therefore thine eye be single, thy whole body shall be full of light.
Mat 6:23 But if thine eye be evil, thy whole body shall be full of darkness. If therefore the light that is in thee be darkness, how great is the darkness!
Mat 6:24 No man can serve two masters; for either he will hate the one, and love the other; or else he will hold to one, and despise the other. Ye cannot serve God and mammon.