Absolutely not. A job advertisement should never prohibit anyone from applying based on one of the prohibited grounds of discrimination. Language such as ‘this nationality only’ or ‘this nationality not welcome’ is blatantly discriminatory, and yet still occurs in some instances (and often receives media attention when it does).
What a job advertisement or listing can do is list certain skills or credentials that would be preferred, and also elements that are required for the role. A certain license or degree may be preferred, but candidates should still be allowed to apply for the role without them even though they may be unsuccessful. An additional language may be preferred or an asset, but it would be outright discriminatory to say that an applicant must be of that cultural background.
If a certain skill is required for the role as a bona fide occupational requirement, meaning that it is required in good faith and cannot be performed without, then it can be listed as a requirement on a job advertisement. For example a job listing for a driver position may be required to possess a valid driver’s license, or a mover with a moving company may be required to lift in excess of 50 lbs. These requirements may rule out certain applicants in protected classes, but are requirements of the role that cannot be otherwise accommodated.