Let $x$ have dimensions $[L]$ of length, so that $dx$ also has dimension $[L]$. Then $$\frac{d(x^n)}{dx}\;\text{has dimension}\;\frac{[L]^n}{[L]}=[L]^{n-1}.$$ Therefore $$\frac{d}{dx}x^n=cx^{n-1}$$ for some (dimensionless) constant $c$.
Disregarding the fact that $c$ is undetermined (bonus: can anyone derive it using dimensional analysis?), I am wondering: is this proof valid?
It's not valid, for the reasons that TylerHG and Javier Badia already alluded to in their comments. For example we could use your reasoning to say that if $v$ has dimension $L$, and $c$ is some physical constant also with dimension $L$, then $\frac{d(\sqrt{c^2-v^2})}{dv}$ has no dimension and hence is some constant. The problem is that dimensional analysis is merely a heuristic and doesn't take constants into account. Moreover, it discards information about the function, and so your argument gives the right answer for only $x^n$. Lest you think this kind of function is contrived, it in fact appears in relativitistic formulae where $c$ is of course the speed of light.
[Edit: As requested, I'll try to specify more precisely what is wrong with the argument and what is needed to make it correct.]
One objection to the above counter-example might be that it has more than one variable or constant. But there is still another problem with the argument, which is that there is no a priori reason to suppose that $x^n$ is physically meaningful when $x$ has some dimension $L$, and ${L}$ is not a dependent set ($x$ is not dimensionless). Under both those assumptions, the only possible physically meaningful dimensionless functions of $x$ are the dimensionless constant functions, and hence the only possible physically meaningful functions of $x$ that have dimension $L^k$ are of the form $cx^k$ for some constant $c$. For this to apply to the original question you have to justify why you think $x^n$ is physically meaningful for each $n$, otherwise it is not a valid proof.
In case one might think that the assumptions stated above are obviously valid ones, one should consider say $x^\pi$ or $x^{1000}$. Are they really physically meaningful? If not, how can one use physical units to argue anything about the behaviour of the mathematical functions? If one thinks that the result should simply hold for any $n$ since it holds for some like $1,2,3$, then it's already a fallacy. And even if it holds for all rational $n$, there is still no reason to think that it holds for irrational $n$. All these properties come about because of the mathematical nature of such functions, not physical.