You don't mention your own gender. I know women who have been told by their managers things like, "if you would like to get promoted to manager here, you are going to have to start spending more on your clothes. I recommend doubling your clothes budget and never setting foot in Walmart again." I also know women who've been told to change their hair styles dramatically (eg cut off several feet of it, or grow it six inches longer), get manicures regularly, get their ears pierced, stop wearing large earrings, wear makeup, stop wearing makeup, wear higher heels, wear lower heels, lose weight, and so on. I don't know any men who have told me about being taken aside for these "image coach" moments, though that doesn't mean they don't exist.
The thing is, in many cases the boss is not saying "you are not meeting my dress code, change your ways." They are saying "hey, person I would like to see do well, even though we don't have a rule about this, you should know that your choices about your appearance are limiting your options here." Advice like this is essentially impossible to argue with. If you don't follow it, it just keeps coming. If you push back, and tell them that your appearance has no connection to your ability to do the job, you may find yourself moved from the "person I would like to see do well" category into the "arrogant person who thinks they don't need my well-meaning advice" category - not a place you really want to be.
My advice to you is this. First and foremost you must apologize. Even if you were right to say whatever you said, the way you said it has upset your boss. Fix that. Second, try to understand whether these comments about posture, unironed blazers, hair and so on fit better into "you are not following our company dress code and your job is in danger" or "I would love to see you get promoted and think these changes could get you there." Of course they could also fit "your mother didn't raise you right, allow me to take over" and I sense that's how you're responding to them. But you need to know for sure how they were meant. Third, thank your boss for taking the time to give you information you clearly needed. Fourth, tell your boss what you are going to do about it from now on. Possibilities include:
- Thankyou, and I am sorry that I didn't grasp the dress code properly. I will comply with it from now on
- Thankyou for your suggestions about being more promotable. I don't want to change my appearance like that, even if it might lead to a management role. I like doing this work and dressing this way. I appreciate you explaining the role that appearance plays in my career.
- Thankyou for caring about the way I am perceived by others and explaining some changes I could make. I've decided not to do that, because I like the way I look. I hope over time people will stop thinking less of me for it.
The actual decision, and the words with which you explain it, are of course up to you. This may involve several conversations if you need to go away and think about what your boss has told you about your appearance at work. Once you make this decision and close the subject with your boss, be sure to close with a final apology for the awkward or overly-personal tone of the previous conversation, and thank your boss again for reaching out on a delicate topic like this. You may also want to thank her in advance for not raising it again.