I don't know what part of the world you're in as you do not say, so can only offer guidance based on my knowledge of UK employment law. As it stands I highly doubt this would be accepted by your employer, unless you're a genius in your field! However, I think what you're after is known as a Sabbatical
What is a sabbatical?
A sabbatical is a more formal system. A ‘sabbatical policy’ may exist within a company, whereby employees are able to take an agreed amount of time off. The usual job ‘perks’, such as being paid and your pension contributions, may be suspended for the duration of the sabbatical period. However, employees have the security of returning to their job. The period of time allowed depends on the company and may only be accessible to employees at a certain level in the organisation such as senior managers or full-time staff. This is the option for those who may be planning to return to the same job or field of work. It can be a useful way to take time out from your job to reassess where your career is heading and how you would like it to progress when you return.
Read more: http://www.careershifters.org/expert-advice/career-break-or-sabbatical-how-to-decide-what-is-right-for-you#ixzz3aVIjgvCJ
You should note that some employers may not have any such system in place, and even if they did... Whether or not it could be used to then work for another company is highly debatable.
In the UK most companies/employers have a claus in their employee contracts which denotes a Conflict of Interest
- Which basically means, you can't work for any other company who may be in the same line of business or a competitor, in your line of work. This is mainly so you don't / won't take customers/contacts etc etc. You may of course argue that "I would never do such a thing!" But that's hardly legally binding.
On the flip-side of this, you can but ask. If you're set for a change, then the most they can say is "No", at which point you may want to weigh up your options. It's always quite worrying leaving employment for something else, but you may have no choice but to just risk it. Your situation is very much a case of you wanting best of both worlds, which isn't always possible.
Food for thought: The grass may be greener on the other side, but it'll be just as hard to mow.