I understand from other related posts here that Fourier Expansion is possible only for Periodic Functions.
Also, the text book which I am reading states: "Any Periodic function $f(x)$ of period $2 \cdot \pi$, which satisfies certain conditions known as Dirichlet's Conditions, can be expressed in the form of the series $$a_0 + \sum_{n}(a_n\cos(nx) + b_n\sin(nx))$$, for all values of x in any interval c to c + $2\pi$, of length $2\pi$. The expansion of $f(x)$ in the form of the above series is called Fourier Series".
The text book is full of examples like 'Find Fourier Series for $f(x) = x^2$ or $f(x) = e^{-x}$ ' etc. So are these functions ($x^2$ or $e^{-x})$, periodic?
No. They are usually, but not necessarily, considered on the finite interval, $[-\pi,\pi)$. You can always extend them periodically to $\mathbb{R}$ then by setting $$f(x+2n\pi):= f(x), n\in \mathbb{Z}\backslash\{0\}, x\in [-\pi,\pi)$$
(And yes, the classical Fourier expansion is valid for periodic functions only).