I see no particular reason to include "of a", but also no particular reason to condemn it.
Dictionaries cite "Too much of a {something}" as an idiomatic phrase
macmillian You would need a countable noun for the "something". Trouble, in the sense you are using it, is properly an uncountable noun. So "If it's not too much trouble" works fine.
But the idiom will interfere and influence speakers to insert the words "of a", especially in natural speech. treating "a trouble" as a countable noun, which causes no problems of understanding. It is very natural, especially in casual spoken English, for additional words to be inserted.
So the sentence, as quoted, is grammatical, fairly idiomatic, and will naturally be produced by native English speakers. But the form without "of a" is better and more correct.