For the sake of this argument, I will assume that you are referring to intentional social discrimination as defined in this article (And for the sake of your debate, I recommend you agree upon a singluar definition of discrimination, becuase it is not as clear-cut as you might think).
Furthermore, we will have to assume that the action that is being taken is in fact a negative one, or one that sets the individual at a disadvantage. We could argue about whether or not restrictive dress codes are a disadvantage, but for the sake of this argument we will ignore whether or not it is, and assume that whatever discrimination is taking place, it is known to be in some way a disadvantage to the one being discriminated.
Finally, let's make one more assumption - that the individual performing this discrimination is fully aware that it is a disadvantage to the person being discriminated. Whether or not discrimination is happening if the person doing it is aware of their discriminating actions is a subject for another debate, so I am going to focus on this and this alone.
Now, if the individual is being told to act in a certain way throughout their life, and this is based on traditions and not deviating from the individual's treatment of any other person of that type, and they are unaware of any other way to be treated, it is still discrimination, because the person performing the action is well aware of this choice, and is choosing to perform this action based on this person's status as a woman (Or any other factor that could lead to discrimination). The actor's awareness of another option is what makes this discrimination - it has nothing to do with the discriminated person's knowledge of the act.
More importantly though, this activity is completely unjust if it does indeed put the person in question at a disadvantage. Whether or not a person is aware of the discrimination does not change whether this action is just or unjust. And putting a person into a situation that knowingly sets them at a disadvantage, even if it is institutionalized and common practice, is still unjust.
Whether or not the activity itself is unjust is an entirely separate debate - but if the action is unjust to the person, it is unjust regardless of their lack of awareness to it being unjust.
As an example, imagine that I am a boss looking to hire a new employee to a firm. Two candidates apply to the position, one a woman and one a man. The woman is superior in terms of ability to perform work, but I choose the man for a discriminatory reason, which denies the woman a chance at a job. I do not tell her this, and she never finds out.
Is this situation just because I did not tell the woman why she was rejected? No. Would the situation only become unjust if she were to find out about the situation? No. Regardless of her knowledge of the situation, my decision not to hire her was unjust and discrimination.