Another way is to measure the volume using a pycnometer. You measure the mass of pycnometer plus a liquid of known density, usually water. Call m1 this mass plus a mass of certain amount of pieces of material. Now, the pieces of material are inserted into the pycnometer to displace a certain volume of liquid. Mass is measured and is called m2. The difference m1 - m2 is the mass of the displaced liquid, then this volume is calculated, which is the volume of the pieces of material.
Place your polymer test piece in a liquid of higher density than the polymer (example: water, if your polymer sample is natural rubber). Add a miscible liquid of lower density than the polymer (example: methanol) gradually with stirring until the polymer is suspended in the mixed liquid (i.e. water-methanol mixture). Measure the density of the mixed liquid with a hydrometer, pycnometer or other methods. Density of polymer=density of the mixed liquid
The simplest way is the archimides method using a picnometer, although you want to measure the density of a thin film in which the things can definitely get more complicated.
I have already ask this question (measuring the density of thin films) here on researchagte https://www.researchgate.net/post/Measuring_density_of_thin_films-can_anyone_help?ev=home_person_like_question_object