Is sexual selection evolutionarily advantageous?
What does "evolutionary advantageous" mean?

First note that is sexual selection evolutionarily advantageous? is a question that makes no sense. An allele or a trait can be evolutionarily advantageous if it increases the fitness of its carrier. If an allele, an evolutionary process or an environmental change decreases the risk of extinction for a species, then you cannot talk about evolutionary advantage. Selection (whether natural, sexual, artificial or whatever) does not (necessarily) minimize the risk of extinction of species.

This post is very related to your question and is definitely worth reading.

I hope your teacher didn't really say that! Assuming he did say that, then know that it is really not as easy as he's suggesting.

There are a number of studies that address the question on whether Sexual Selection (SS) and Natural Selection (NS) have opposite or antagonist effects. The subject is not easy and as SS is not my field of expertise my answer will not be complete. I will talk about two possible hypotheses for explaining the existence of SS and what they mean in terms of probability of extinction.

Good Genes

Under the "Good Gene" hypothesis, females' preference (we'll assume that females are choosy but there are many species where males are choosy) of some traits evolve because those traits are correlated with the global health of the male. In consequence, by choosing a male carrying some trait, the female makes sure that her offsrping will receive good genes from their father. This hypothesis assumes that poor males cannot produce fancy phenotype, while good males can. This is called Zahavi's Handicap Principle.

Under this hypothesis, if a trait become too costly for a given male, the male will just die, therefore limiting the evolution of secondary sexual traits. As a result, the population will no get extinct. Furthermore, under this hypothesis, SS may actually increase the effect of NS making sure that only the best male reproduce. In results the mean absolute fitness of the population should increase faster in a population where "Good gene"-SS occurs.

Sexy Son

Females preference for some trait may also evolve because mating with a sexy male means having sexy sons. This is called the "sexy son" hypothesis.

Under this hypothesis, again if a sexy male has a low enough survival, then a female has better to mate with a less sexy male (even though her offspring won't be very sexy) so to increase the survival of her offspring. After a bunch of generations, all females will end up preference mating with non-sexy male, changing the concept of what we call sexy in this population and therefore reversing the effects of SS.

You may also want to read about Fisher's runaway processes.

Just an article among others

Aneil Agrawal has some nice articles on SS that may interest you. This article for example discusses how sexual antagonist genes influence whether SS has an antagonist or parallel effect to NS.

Is SS really different from NS?

Your question Why natural selection did not eliminate sexual selection? assumes that NS and SS are two different things! This is a very old-style point of view. Charles Darwin coined these two terms thinking of two, unrelated processes. Today, most authors see SS as being part of NS (if a chestnut tree is a type of tree, SS is a type of NS). And many of the processes that are termed SS has actually not much to do with "competition to access a mate" but only has to do with NS. For example, many people talk about SS when talking about sexually antagonist genes or sexual conflicts. In short, the concepts are kind a mixed up. You may want to read about the work of Hannah Kokko about the semantics of terms related to SS.