I have some confusion over random variables and the law of total probability. Suppose I have a random variable $X$ that follows a pmf $f(x)=P(X=x)$. And suppose that this variable $X$ were to represent the proportion of white balls in an urn. This scenario is in a sense when one is drawing from an urn but is unsure of the proportion of balls in the urn so they have a prior belief given by $f(x)$
Let $P(white)$ be the probability of drawing a white ball from the urn. $$P(white)=\sum_{\forall x} P(white|X=x)P(X=x)=\sum_{\forall x} x P(X=x)=E(X)$$ (using the law of total probability)
But by definition the probability of drawing a white ball was $X$, which is a random variable, so wouldn't $P(white)$ also be a random variable? $E(X)$ is clearly just a non-stochastic constant so is it true that $P(white)=X$ or is there something wrong in using the law of total probability here?
The law of total probability is fine. Your mistake comes from (confusingly) assuming that $P(\textrm{white})$ is a random variable, in particular that it is $X$. In fact, it is not: it is a probability, which is just a constant, so can be equal to $E(X)$, which it is. That also makes sense: the chance of a white ball is the mean of all proportions, which is "intuitive" to me at least. $X$ is just a randomly drawn "proportion" so we can assume from what you have told us that $X$ is a $U(0,1)$ uniform random variable (this by the way makes your sum notation wrong: you need an integral if $X$ has support $\mathbb{R}$). Your sum notation is correct if $X$ has countable support.