You don't say what other information you have for the "several stars". Yes, you can use a mass-luminosity relationship if the stars are on the main sequence. In terms of mass uncertainties I would estimate that you might be at the level of 20% unless you can absolutely pinpoint them on a Hertzsprung-Russell diagram, because the luminosity of a (fixed mass) main sequence star changes, even whilst it is on the main sequence.
If the stars are in any other phase of their evolution then your problem is much harder, even if you can place them on the HR diagram. Not least because there is considerable disagreement between different evolutionary models as regards the positions of stars of a given mass at a given age, on both the pre- and post-main sequence. Furthermore, their luminosity and temperature evolution can be influenced by factors such as rotation, metallicity, magnetic fields and mass-loss.
Compact stellar remnants and brown dwarfs do not follow a mass-luminosity relation. In general you can only estimate their masses if they are in binary systems, or for white dwarfs, you can estimate their radii and either their surface gravity or gravitational redshift. Estimating a brown dwarf's mass needs both its luminosity and age.