Yes. If the volume is at STP, or can be calculated to STP
At STP the volume of a gas can be converted to moles
The number of moles can be converted to mass by multiplying by the molecular mass ( weight mass is better)
1 mole of a gas at STP = 22.4 liters.
Volume/ 22.4 liters = moles.
moles x grams/mole = grams.
If you know the present temperature and pressure the given volume can be converted to volume at STP. The volume at STP can be converted to moles.
If you do not know the present temperature and pressure the volume can not be converted to volume at STP. The volume not at STP cannot be converted to moles.
If you want to calculate the mass for a solid or liquid, and all you know are its volume and molar mass, then no, you cannot calculate the mass unless you:
- know what its density is, or
- know what its identity is so that you can look up its density.
If you just know its volume
Or, if you're talking about a real-life situation, if you have a scale, just measure its mass on the scale. For liquids, measure by difference (weigh the beaker, put it in a beaker, weigh the sum, then subtract the heavier from the lighter mass).