Such functions are the same as homomorphisms $G_0(R)\rightarrow\mathbb{Z}$ from the Grothendieck group of your category, the $G$-theory group of degree $0$. The answer is only trivial from this formal point of view. The computation of $G_0(R)$ is non-trivial in general. If your ring is commutative noetherian and regular then $G_0(R)=K_0(R)$ is the $K$-theory group of degree $0$, i.e. additive functions only depend on the behaviour on projectives. Let me complete my answer with the examples you consider in your question. If $R=k$ is a field $G_0(k)=K_0(k)=\mathbb{Z}$ generated by the isomorphism class of $k$, therefore all additive functions are multiples of the dimension. If $R$ is artinian then $G_0(R)$ is the free abelian group on simple $R$-modules, hence not all additive functions are multiples of the length in general, but for each simple module $S$, $\lambda(S)=n_S\cdot\operatorname{length}(S)$, and any choice of such $n_S$ determines an additive function $\lambda$.