Yes, it only works if the items are non-indentical. $^n\mathrm C_r$ counts the _distinct_ ways to select $r$ elements from a set of $n$ _indistinguishable_ elements. If the elements were _identical_ , there would only be one _distinct_ way to select $r$ of them. (Assuming integer values and $0\leq r\leq n$.)
**Note:** Physically the balls will be unique entities, but what we are counting is the arrangements of _identifiable traits_. (Such as colours.)
* * *
PS: ${^n\mathrm C_r} = \frac{n!}{r!(n-r)!}$. I've encountered it written as $\mathrm C^n_r$, but always with the superscript corresponding to the numerator while the subscript to the denominator. It would be confusing for a text to present it otherwise.