If that isn't a commandment, what is?
It's an invitation to this particular man, one which he was free to decline.
"If you wish to be perfect: to be perfect is demanded of all Christians; see Mt 5:48. In the case of this man, it involves selling his possessions and giving to the poor; only so can he follow Jesus."