It is most convenient for implementation of the IFFT and FFT, that the number of subcarriers is a power of 2. However, it is not necessary.
Even in practical systems, it may not be a power of 2. In LTE, for example, there are 6 allowed bandwidths, ranging from 1.4 MHz to 20 MHz. For the 15 MHz deployment bandwidth, the number of subcarriers is 1536. See this doc for more details.
But how would a 1536-point FFT be implemented in practice? See this Application Note on how it might be implemented. A key is the radix-3 engine.