It should be "a while". "While" is a noun referring to an unspecified period of time, so it needs an article ( a) before it. Here are some similar phrases:
We can talk for an hour.
We can talk for a moment
We can talk for a bit.
We can talk for a while.
The word "awhile" is an old-fashioned adverb, sometimes used in phrases such as "Wait awhile". It's fairly unusual, and mainly used in American English. In fact, I didn't even know that 'awhile' existed before I joined italki and noticed that learners were asking about it. It isn't wrong to say "Wait a while", so you never actually need to learn how to use "awhile". I really wouldn't worry about it, if I were you. You can forget about "awhile" .