Why is it grammatically correct apparently to say, for example "My annoying-ass art teacher"? Or is it? If ass is a noun normally, then what part of speech is it when used to suffix an adjective? Can someone please explain how suffixing adjectives with ass grammatically works out? Is it even technically grammatically correct? If so, what part of speech is it? My question is not a duplicate as it is not related to origins.
Yes, it's fine to say annoying-ass art teacher (though I don't advise doing that while she's within earshot). When ass is applied as an intensifier, it combines with its host to form an "amplified" adjective. The OED has your back (so to speak):
4. As the second element in compounds, forming adjectives with the sense ‘having or displaying the quality designated by the first element to an extreme or undesirable degree’, as broad-ass, snobby-ass, cheap-ass, sorry-ass, stupid-ass, long-ass, etc. Cf. ASSED adj.
1. See also BIG-ASS adj., PANSY-ASS adj., poor-ass adj. at POOR adj. and n.1 Compounds 1c, punk-ass adj. at PUNK n.1 and adj.2 Compounds 2, raggedy-ass adj. at RAGGEDY adj. Compounds.
Diana Elgersma's fine abstract Serious-ass morphology: The anal emphatic in English notes that:
Mono- and bi-syllabic adjectives are the most frequent bases for the ‘-ass’ affix; however, though marked, tri+-syllabic adjectives are not ungrammatical . . .
So, while an·noy·ing-ass doesn't exactly roll off the tongue, you're good to go.
It depends on the context of your situation. If you are talking casually, of course it's okay! It mostly depends on who you are talking to. You would not call your college professor a "dude," and you wouldn't talk extremely formally in front of your friends either. Furthermore, "ass," like some other words, can be multiple parts of speech. It can be used as a noun, or an adjective,
In an early comment on the post, @tchrist gives the example “I don't under-flipping-stand what you think is “techni-fricking-ly flipping ungrammatical" This is known as "Expletive infixation" - https://en.wikipedia.org/wiki/Expletive_infixation - the oath remains an interjection.
Infixes (placed inside the word), prefixes (placed in front of the word) and suffixes (placed after the word) are affixes - your examples is a suffix. Thus it appears to be an expletive suffix.