First, let's analyze the accepted notion of what is class consciousness. According to the likes of Marx, and George Lukasc, this feeling is created by each socioeconomic class as a group, and then by each member of the class individually. The view of the class itself as a group is created by the opportunities and benefits that they are able to acquire in society. When the class acquires much, it aims for more. When the class struggles, they might risk giving up challenging themselves as a group. Yet, each individual can set goals for themselves with a vision of what they want.
In Mathilde's case, the problem is (in Maupassant's words) she was part of a social class in which, quote:
"...women have no caste or class, their beauty, grace, and charm serving them for birth or family, their natural delicacy, their instinctive elegance, their nimbleness of wit, are their only mark of rank, and put the slum girl on a level with the highest lady in the land."
In view of this, we can establish that she already saw herself as an unfortunate. Even more unfortunate is the fact that she, as an individual has a mismatched vision of what she wants, considering what she is and her circumstances:
"She suffered endlessly, feeling herself born for every delicacy and luxury. She suffered from the poorness of her house, from its mean walls, worn chairs, and ugly curtains. All these things, of which other women of her class would not even have been aware, tormented and insulted her."
In this argument, we cannot point out that Mme Loisel felt envious. In fact, what she felt was self-pity of her situation, and felt angry at her own life. She did want to belong to the upper classes, but she was too angry at her own life to even talk to her rich friend. Yet, she was able to borrow her necklace, so that still makes us wonder if she was envious, or just sorry for herself.
However, the effect of her feelings caused her to lose control of herself, to lose herself to the moment, to enact every fantasy she kept building in her psyche, and (because of that lack of control) she lost the necklace perhaps in a moment of opulent frenzy at the ball, and ruined her life forever.