If you, the employee, are working for an employer you respect, and vice versa, YOU CAN HAVE A CONVERSATION!
If your day job is, say, maintaining high-capacity forum software in dotnet, and you have this hankering to develop, say, a WordPress plugin to show the time of sunrise, you can talk about it.
If you respect your boss and she respects you, the conversation will be fruitful. She may say, "please don't do that," and you'll understand why not. She may say "go ahead."
If you DON'T respect your boss, there's lots of advice here about how to proceed. But why not start out assuming mutual respect?