Third-harmonic (TH) generation from a thin layer on a substrate is analyzed in reflection and transmission geometry taking into account interference effects of fundamental and TH waves in the film, the backward-generated TH, and the pump-beam profile. Conditions are derived for both geometries where the signal from the film dominates, which is important for TH microscopy. The analysis results are applied to retrieve from experiment nonlinear susceptibilities χ(3) of hafnia/silica mixture (Hf(x)Si(1-x)O₂), alumina (Al₂O₃), and scandia (Sc₂O₃) thin films.