What you describe actually happened to me. I left a company and came back a year later to what would become a team lead role. After 3.5 years, I left again.
Regarding your questions, yes, it's ok to go back, there are a lot of wins for both you and the company to be had. And yes, if you left on good terms then I don't see why your director wouldn't be pleased to have someone back that doesn't have to endure as big a learning curve.
The responses from Doc Brown and littleadv were both good.
I would add these concerns and considerations:
- There might not be a third time. If you left again as I did, it might be the last time. I left the second time for exactly the reasons you specified: I hit a ceiling and the company's IT department doesn't provide much of a career path; it's a small shop and there's just not much room to move in. Despite leaving on decent terms though, I think the company would probably not want to go through a third stint. It might not be that way in your situation, and of course things could change if the regime changes. But even though we should be logical about hiring quality people, we're also human and it's quite possible people in the company will feel you've slighted them a second time and will not be interested in future associations. That might be perfectly OK; in my case, even though I still like the company and the people, I don't suspect the company will change significantly enough to remove the barriers that caused me to leave. It's just something to consider.
- Is taking this position going to be a wasteful diversion? I don't consider my second foray with the company a total loss, but looking back, I wonder if it ended up being a 3.5 year detour from the path I should have taken. I gained valuable leadership experience, but I went back to yet another traditional IT shop that doesn't get IT, answers to the CFO instead of the CEO, is reactive rather than strategic or innovative, values deadlines over quality, and didn't have much room for growth. These things didn't change when I left the first time, and had I been more careful about analyzing it, perhaps I would have done things differently. I think I'd have been financially much better off if I'd stayed at my former position for another year and then gone to consulting as I have, or found a different company entirely. But if you feel this second stint will still be of value, go for it. If you eventually feel you have to leave to earn more and learn more, then it's the company's fault for not managing its employees.
- Is it the right time to go back? Related to both points above, if you're going to go back, and you want a career path, and given that there might not be a third time, is there a possibility you could wait for a manager or director job instead? Of course you can't time how all these things will work out, but if you really like the company and there's a chance you could get a position that you'd stay in for longer or that had more growth potential, that might be better.
No right or wrong answer in the end. It's up to you to do what you feel works best.