It is not considered correct in standard English. It is correct according to certain English dialects. So it depends who you ask! :) Of course, if you want to learn and speak "standard" English, then you would avoid this usage. I can tell you that "to learn you something" as in "to teach" or "to impart knowledge" has a long history in English. This usage dates from at least the 1400s, so from about 200 years before Shakespeare.
In fact, Shakespeare himself uses the verb this way in "The Tempest" when he writes: "The red-plague rid you for learning me your language". Here, "learning" means "teaching."
Nowadays, this usage is not part of standard English. It is part of dialectal English.
There is also a secondary meaning of "I will learn you." And in this case it means "I will punish you." This also is nonstandard usage.