We present the results of a high-resolution inelastic neutron scattering experiment on three samples of ternary tetrahydrofuran clathrate hydrates, containing either H-2 at different para/ortho concentrations, or HD. The spectrum due to the H-2 molecule excitation shows spectral bands that are assigned unambiguously to rotational transitions, centre-of-mass translational transitions of either para- or ortho-H-2, and to combinations of these. We demonstrate that the H-2 molecule rotates almost freely, while performing a translational motion (rattling) in the cage, resulting in a paradigmatic example of the motion of a quantum particle in a non-harmonic three-dimensional potential well. Both the H-2 rotational transition and the fundamental of the rattling transition split into triplets. This is a consequence of a significant anisotropy of the potential with respect to the orientation of the molecule in the cage, in the first case, or with respect to the centre-of-mass position inside the cage, in the second case. The comparison of our experimental values for the transition frequencies to a recent quantum mechanical calculation is discussed. Spectra obtained at different temperatures confirm an appreciable anharmonicity of the potential energy for the H-2 molecule in the cage.