Can CBOW model only accept fixed number of words?
That's a good question. The answer is yes and no. 

No because the input layer of the CBOW model expects a fixed number of words. So you'll either always input 3 words or 9 words. 

Yes because you can however set the sequence length as 9 words and provide just 3 words as context while the remaining 6 words can just be zero vectors. Remember in a CBOW each word is represented by a vector.