First of all, the astronauts would be measuring mass. This is the property of a thing that determines how hard it is to accelerate the thing. It does not change with the local gravity. or lack of gravity. A 450 Magnum slug will hurt just as much if it hits you on Earth, Mars, Luna, or the ISS.
There's a lump of stuff kept very safe in a lab in France. The mass of that lump is ***defined***as exactly 1 kilogram.
Most people will frequently use the terms weight and mass interchangeably. Only nerdy types like Physics teachers will insist on a distinction.
As it happens, an object's mass also determines how much force the local planet exerts on it. Thus, you can guesstimate the mass of something by lifting it and using experience to tell you the mass. If you lack the experience, like The Martian, the guess can be off.
You can measure the mass of an object by using a spring to pull up the object. This is unsatisfactory for a number of reasons: gravity is different in different parts of the world (and on different worlds) and the spring may change its properties with temperature, age, or mistreatment. If you look at the scale used in a store to measure stuff for sale, you may see something like; "Honest weight; no springs."
The simplest way to measure mass accurately is to use the local pull of gravity on two masses: the one you want to measure, and one or more standard masses that are already determined. For example, this chemical balance:
uses a set of calibrated masses piled on one pan, and the unknown mass on the other pan until the pans balance. This balance, with the same set of standard masses, can be used anywhere in the world, or on Mars, or the Moon, with exactly the same results in every location. The only assumption is that gravity is the same at both pans.
Another type of balance is slightly different:
Here, instead of having a set of standard masses, the balance has two or more standard masses that move from notch to notch in a horizontal bar. Here, the accuracy depends on the size of the standard masses and on the location of the notches in the bar. Worn notches, or smears of peanut butter and jelly on the masses, can degrade the accuracy.
In short, any scale that measures mass by comparing the pull of gravity on standard and unknown masses will work to give the same mass in any gravity field...