A well studied problem in algebraic complexity theory is the determination of the complexity of problems relying on evaluations of bilinear maps. One measure of the complexity of a bilinear map (or 3-tensor) is the optimal number of non-scalar multiplications required to evaluate it. This quantity is also described as its tensor rank, which is the smallest number of rank-1 matrices whose span contains its first slice space. In this paper we derive upper bounds on the tensor ranks of certain classes of 3-tensors and give explicit constructions of sets of rank-1 matrices containing their first slice spaces. We also show how these results can be applied in coding theory to derive upper bounds on the tensor rank of some rank-metric codes. In particular, we compute the tensor rank of some families of Fqm-linear codes and we show that they are extremal with respect to Kruskal's tensor rank bound.