Let $x\in\mathbb{R}$. Define $$S_{\leq x}=S~\cap~(-\infty,x]~~~\mathrm{and}~~~S_{>x}=S~\cap~ (x,+\infty)$$ and define $S_{\leq}=\{$ the set of all $x$ such that $S_{\leq x}$ is uncountable $\}$, and $S_>=\{$ the set of all $x$ such that $S_{>x}$ is uncountable $\}$.
$S_{\leq}$ is a non empty$^{(*)}$ interval that extends to infinity on the right, and is therefore of the form $[a,+\infty)$ or $(a,+\infty)$ for some $a\in\mathbb{R}$ or is equal to the whole of $\mathbb{R}$.
Similarly, $S_>$ is a non empty$^{(*)}$ interval that extends to infinity on the left, and is thus of the form $(-\infty,b]$ or $(-\infty,b)$ for some $b\in\mathbb{R}$ or is equal to the whole of $\mathbb{R}$.
$^{(*)}$ : I have used some form of choice I believe when I say that $S_>$ and $S_{\leq}$ are non empty, because I use the fact that with some form of choice, the countable union of countable sets is still countable. Is it countable choice? Since $$S=\cup_{n\in\mathbb{N}}S_{\leq n}$$ is uncountable, at least one of the $S_{<n}$ must be uncountable, and so for some natural number $n$ you have $n\in S_{<}\neq\emptyset$.
Let's show that $S_>\cap S_{\leq}$ is non empty. If either one of $S_>$ or $S_{\leq}$ is the whole real line, there is no problem. So let's suppose none of them is the whole of $\mathbb{R}$.
Suppose $x\in S_{\leq}$ that is $S_{\leq x}=S~\cap~(-\infty,x]$ is uncountable. Since $$\bigcup_{n\in\mathbb{N}^*}S_{\leq x-\frac{1}{n}}\subset S_{\leq x}=S~\cap~(-\infty,x]\subset \{x\}\cup \bigcup_{n\in\mathbb{N}^*}S_{\leq x-\frac{1}{n}}$$ the already used fact that countable unions of countable sets are countable with some form of choice implies that at least one of the $S_{\leq x -\frac{1}{n}}$ is uncountable, which means that for some $n\in\mathbb{N}^*,~x -\frac{1}{n}\in L$ and thus $S_{\leq}$ is open, that is, $$\mathbf{S_{\leq}=(b,+\infty)}$$ for some real number $b$. Similarly, $$\mathbf{S_{>}=(-\infty,a)}$$ for some real number $a$.
Then $S_>\cap S_{\leq}$ is empty iff $a\leq b$. But this would entail that $$S=S_{\leq a}\cup S_{> a}$$ is countable as the union of two countable sets, since $a \notin (-\infty,a)=S_{\leq}$ means $S_{\leq a}$ is countable, and $a \notin (b,+\infty)=S_{>}$ means $S_{> a}$ countable.
First let us clear up the definitions, since there may be some confusion about them.
We say that a set $A$ is finite, if there is a natural number $n$ and a bijection between $A$ and $\{0,\ldots,n-1\}$. If $A$ is not finite, we say that it is infinite.
We say that a set $A$ is Dedekind-finite, if whenever $f\colon A\to A$ is an injective function, then $f$ is a bijection. If $A$ is not Dedekind-finite, we say that it is Dedekind-infinite.
What can we say immediately?
- Every finite set is Dedekind-finite, and every Dedekind-infinite set is infinite.
- $A$ is Dedekind-infinite if and only if it has a countably infinite subset if and only if there is an injection from $\Bbb N$ into $A$.
- Equivalently, $A$ is Dedekind-finite if and only if it has no countably infinite subset if and only if there is no injection from $\Bbb N$ into $A$.
While in some low-level courses the definitions may be given as synonymous, the equivalence between finite and Dedekind-finite (or infinite and Dedekind-infinite) requires the presence of countable choice to some degree. This was shown originally by Fraenkel in the context of $\sf ZFA$ (where we allow non-set objects in our universe), and later the proof was imitated by Cohen in the context of forcing and symmetric extensions for producing a model of $\sf ZF$ without atoms where this equivalence fails.
Interestingly enough, Dedekind-finiteness can be graded into various level of finiteness, so some sets are more finite than others. For example, it is possible for a Dedekind-finite set to be mapped onto $\Bbb N$, which in some way makes it "less finite" than sets which cannot be mapped onto $\Bbb N$.
Best Answer
The answer is yes, under the axiom of choice, such a partition is possible. There are several ways of seeing this. For example, choice gives us that any set is in bijection with an infinite ordinal. But, for any infinite ordinal $\alpha$, there is a bijection between $\alpha$ and $\alpha\times \{1,\dots,n\}$. The bijection is in fact canonical, in the sense that there is a "uniform" procedure that applied to any infinite ordinal $\alpha$ produces such a bijection. If you are somewhat familiar with ordinal numbers, a proof can be found in this blog post of mine.
Of course, if $\alpha$ is in bijection with $X$, then $\alpha\times \{1,\dots,n\}$ is in bijection with $X\times \{1,\dots,n\}$, so the latter is in bijection with $X$. The required partition is then the image under the bijection of the sets $A_a=\{(a,i)\mid 1\le i\le n\}$, for $a\in X$.
(To mention but one other standard argument, using choice, we have that $X$ and $X\times X$ are in bijection so, invoking the Bernstein-Schroeder theorem, we conclude that $X$ and $X\times\{1,\dots,n\}$ are in bijection as well.)
On the other hand, the answer is no, without the axiom of choice it is in general not possible to produce such a partition. This is addressed at length in this MO answer, with details in the references linked there.