Yes, it can.
The abstract definition of a polynomial with coefficients in a commutative ring $R$ is βan element of the set $R^{(\mathbf N)}$, i.e. an infinite sequence of elements of $R$ with finite support. I has a structure of an $R$-algebra if addition is defined componentwise and multiplication is defined as a Cauchy product. With this approach, $X$ denotes the sequence $(0,1,0,0,\dots,0,\dots)$, and one easily checks that $X^2=(0,0,1,0,\dots,0,\dots)$, $X^3=(0,0,0,1,0,\dots)$, and so on.
Similarly, one defines the ring of formal power series, denoted $R[[X]]$, as the set $R^{\mathbf N}$, i.e. the set of infinite sequences without any condition, endowed with addition componentwise and the Cauchy product. The ring of polynomials $R[X]$ is a subalgebra of the $R$-algebra $R[[X]]$.