Правильна ли грамматически фраза "Она учит русский язык". Тут - Use of Dative after учить etc - прилагательное "русский" склоняется.
“Учить” can mean ‘to teach’, but also it can mean ‘to learn, to study’.
When it means ‘to teach’, it is usually followed by two objects, an Accusative object (the person being taught), and a Dative one (the subject taught):
She teaches me the Russian language.
Она учит меня (Acc.) русскому языку (Dat.).
When “учить” means ‘to learn, to study’, it is followed by just one Accusative object which names the subject studied:
She studies the Russian language.
Она учит русский язык (Acc.).
Taking this into account, you can see that the sentence “Она учит русский язык.” is absolutely correct from the point of view of the Russian grammar. The point is, since “русский язык” is an obvious name of a subject, and it is in the Accusative case, that sentence can only be translated as “She studies/learns the Russian language”, but definitely not “She teaches the Russian language”, the use of the cases after that verb defines whether it means ‘to teach’ or ‘to learn, to study’.
Russian language contains a number of verbs that have pronouncedly transitive nature, yet don't mandate a specific direction of the associated action. In most cases the the direction can be deduced from the accompanying directional preposition, if any is present. In the absence of said preposition sometimes the only way to determine the direction is to analyze the surrounding context.
One example of such verb, encountered quite often is "вернуть" ("to return "). For example, "Алекс хочет вернуть эту книгу" can mean that: 1) Alex has someone's elses book and wants to return it to the owner, or 2) someone else has Alex's book and Alex wants it back.
The verb "учить" is another example of the same thing. It can mean both "to teach" and "to learn/to study". This verb does not accept a directional preposition, which often makes it difficult to figure out what is meant without context.
The former meaning - "to teach" - can legally accept either an Accusative or Dative object. Meanwhile, the latter meaning - "to learn/to study" - requires Accusative object. This means that your first variant - “Она учит русский язык” - can mean both "She studies Russian" and "She teaches Russian". Your second variant - “Она учит русскому языку” - is unambiguous and can only be interpreted as "She teaches Russian".
Many native Russian speakers perceive the ambiguous nature of such verbs as "mildly objectionable" (let's put it this way) and strive to make sure that their usage eliminates any chance of ambiguity. I.e. they'd avoid sentences like “Она учит русский язык” and rather say "Она изучает русский язык" or "Она преподает русский язык". Your variant with Dative - “Она учит русскому языку” - sounds good as well, since this usage of Dative eliminates the ambiguity.