The comment below is incorrect. You can, "Work there for a spell," but usage of this might be regional. As an Australian English speaker, I would understand it, and I would suppose native UK speakers would to. But that doesn't mean it's the best option.
Neither sentence really strikes me as particularly natural. For example, you can say:
I had/worked a spell at ABC three years ago.
I worked at ABC until three years ago (or just I worked at ABC three years ago).
I would probably go with one of those last two. Using "for" is incorrect.
If you opt for 'spell', I'd suggest using this in less formal contexts and for more throwaway conversation. "Oh, I worked there for a spell too a couple of years back." It's not as great a response to an employer's questioning, however.
Hope this help.