The word smart-arse or smart-ass doesn't always mean the person is right. They might be or might not be. They pretend like they know everything and boast which may vary from case-to-case.
Lexico defines smart-arse as A person who is irritating because they behave as if they know everything. ("smart-ass" is the North American version).
The opposite of the above word informally would be dumbass. Though both words are better off during an informal talk.
Lexico defines dumbass as A stupid or contemptible person. (The British version is just "arse")