For sufficiently large $n$ (say $n \geq 20$), there is no edge coloring of $K_n$ which ensures that every 4-cycle gets exactly 3 colors. In particular, the coloring asked in the question is not possible.
(i) There cannot be a monochromatic $P_3$ as this can be completed to a 4-cycle with at most 2 colors. Thus each color class is a star forest.
(ii) If va, vb, vc have the same color 1, then ab, bc and ca must have different colors other than 1.
(iii) From (ii), it is not possible for a vertex to have four edges incident on it of the same color (this would imply that the edges among those 4 neighbors of v are all distinctly colored).
(iv) It is not possible for a vertex to have more than one color repeating on edges incident on it.
(v) Thus for a vertex v except for 3 neighbors, all other edges out of v are distinctly colored. Now consider another vertex w and the edges from v,w to the remaining vertices. We easily get either a monochromatic 4-cycle or a 4-cycle with all distinct colors.