It's not against the rules to answer your own question, as far as I'm aware. If the question is one that other users may ask, and you have an answer, I don't see what's wrong with posting questions and immediately answering them.
Yes! Stack Exchange has always explicitly encouraged users to answer their own questions. If you have a question that you already know the answer to, and you would like to document that knowledge in public so that others (including yourself) can find it later, it's perfectly okay to ask and answer your own question on a Stack Exchange site.