This is not true for $S^2$.This is not true for $S^2$. Namely, one can construct two convex non-isometric spherical triangles such that all medians have length $\frac{3\pi}{4}-\varepsilon$.
The first triangle is the standard equilateral triangle. Clearly medians of such triangles all have the same length and their length vary from $0$ to $\pi$.
The second triangle will be a perturbation of the following one. Take on $S^2$ two opposite points $A$ and $B$ and join them by two geodesics (of length $\pi$) that bound a sector with angle $\frac{3\pi}{4}$. Call one of these geodesics $AB$. And choose $C$ as the mid point of the other geodesic. It is easy to see that for this degenerate triangle all medians have length $\frac{3\pi}{4}$. Now, by perturbing slightly $A$, $B$ and $C$ one can decrease the lengths of all medians by the same amount.
Note. It is important in the second construction that by varying $A$ and $B$ as little as we want, we can achieve that the median starting from $C$ takes any length in $(0,\pi)$. However the length of two other medians stay close to $\frac{3\pi}{4}$.
PS, hyperbolic case. Concerning the hyperbolic case, it looks like the answer is positive. If I would like to prove it, I would do as follows.
i) Consider the map from the convex cone in $\mathbb R_{\ge 0}^3$ consisting of triples $(a,b,c)$ satisfying the (non-strict) triangle inequality to itself: lengths of sides $\to$ lengths of medians.
ii) Realise that this map if proper (preimage of compact is compact). And it is an isomorphism on the boundary on the cone.
iii) The map is a "diffeo" close to the point $(0,0,0)$ - because it is so for Euclidean triangles.
iv) This is the most complicated bit -- show that the map has non-vanishing differential. This is where one needs to make a calculation. But it looks very plausible.
v) If all the above holds then the map is an isomorphism. QED