That's one read on that and certainly the popular one. I also have personal experience with people who misuse the quote to support their personality defect loaded behavior. Some scholars have written that the quote has been taken out of context to support non-conformity and that Shakepeare used the jerk Polonius telling his son to be selfish as an ironic way of saying don't be selfish.