I think it comes down to two main things: language and intent.
If the language is in and of itself offensive then yes it goes against "be nice". Using profanity or clearly derogatory terms, for example, clearly goes against the policy, regardless of who they are directed against.
If the language itself is pretty tame then it's more about intent. If the statement is explicitly and clearly aimed at yourself then you're less likely to offend anyone. Self deprecation is usually seen as being said with at least a bit of sarcasm or humour. At the very least it's unlikely to be seen with any malicious intent, but context is important.
It just comes down to common sense. If it's likely to cause offence—don't say it.
As for your example "I'm ignorant and my last question was dumb". Without knowing the context that is probably OK, but it seems like a stupid thing to say regardless.