Unlike with the energy, which is a scalar property, machine learning (ML) prediction of vector or tensor properties poses the additional challenge of achieving proper invariance (covariance) with respect to molecular rotation. For the energy gradients needed in molecular dynamics (MD), this symmetry is automatically fulfilled when taking analytic derivative of the energy, which is a scalar invariant (using properly invariant molecular descriptors). However, if the properties cannot be obtained by differentiation, other appropriate methods should be applied to retain the covariance. Several approaches have been suggested to properly treat this issue. For nonadiabatic couplings and polarizabilities, for example, it was possible to construct virtual quantities from which the above tensorial properties are obtained by differentiation and thus guarantee the covariance. Another possible solution is to build the rotational equivariance into the design of a neural network employed in the model. Here, we propose a simpler alternative technique, which does not require construction of auxiliary properties or application of special equivariant ML techniques. We suggest a three-step approach, using the molecular tensor of inertia. In the first step, the molecule is rotated using the eigenvectors of this tensor to its principal axes. In the second step, the ML procedure predicts the vector property relative to this orientation, based on a training set where all vector properties were in this same coordinate system. As the third step, it remains to transform the ML estimate of the vector property back to the original orientation. This rotate-predict-rotate (RPR) procedure should thus guarantee proper covariance of a vector property and is trivially extensible also to tensors such as polarizability. The RPR procedure has an advantage that the accurate models can be trained very fast for thousands of molecular configurations, which might be beneficial where many training sets are required (e.g., in active learning). We have implemented the RPR technique, using the MLatom and Newton-X programs for ML and MD, and performed its assessment on the dipole moment along MD trajectories of 1,2-dichloroethane.