A couple of points on this. While faint rings can exist outside the Roche Limit (like Saturn's G and E rings) - photo is too big to link but click here. rings of any significant mass are only going to reside inside the Roche Limit, so the practical limit of the mass of a planet's ring is about the mass of the largest moon a planet is likely to have, roughly speaking.
A ring around a planet can form in a couple of ways, by giant impact, by a moon passing inside the Roche limit and breaking apart or by accretion, like how Enceladus feeds Saturn's faint e-ring.
Also, rings don't have to be particularly massive to be impressive. The mass of Saturn's rings estimated here (and there's some uncertainty to that estimate, but close enough for our purposes)
Based on Voyager observations, the total mass of the rings was
estimated to be about 3 x 10^19 kg. This is a small fraction of the
total mass of Saturn (about 50 ppb) and is just a little less than the
moon Mimas
So the mass of Saturn's rings is the mass of a pretty small moon, a little under 200 km in radius, but that wasn't your question, so, moving on.
A planet with rings 200 times the size of Saturn (40,000 times the surface area) was observed and if we assume the same density as Saturn's rings (which is a very bad assumption to make, but this is just an approximation), 1.2 x 10^24, or about twice the mass of Mars. Now we're getting somewhere, but there's a few points to make on our friend J1407B
First, it may not be a planet at all. It's mass estimate is 10-40 jupiters which suggests it's in the brown dwarf category. 2nd, it's a young solar system, just 16 million years old, so the ring system may still be in the process of forming a moon system and not be a permanent ring at all. Source. Also, same article, it mentions that parts of the ring system block 95% of the sun's light, so it's a far denser system than Saturn and there's a moon in there thought to be 0.8 times the mass of earth, but I still don't think that should counts since it may be an accretion disk remaining from the formation of that solar-system.
If we set the planetary mass limit to be about 13 Jupiter masses, which is roughly the cut-off between heavy Jupiter and brown dwarf, and we take some estimates of the size of moons to planets, during formation, it's unlikely that moons can be more than maybe a ratio of one to several hundred, due to limitations in angular momentum and likely size of formation. In our solar system, the largest moon to planet ratio, not counting giant impacts or captures is about 1 to 4,200 (Saturn to Titan). Jupiter to Ganymede is 1 to about 12,800 and Tritan to Neptune (and Tritan may be a captured moon), about 1 to 4,800. If we assume a heavy Jupiter of about 13 Jupiter masses and a moon in a decaying orbit that breaks up with a mass ratio of 1 to 400 - and needless to say, that's very ballpark, then this theoretical estimate works out to a practical limit around a heavy jupiter to have a moon system of roughly 10 earth masses. (1/400th the mass of a 13 jupiter mass planet).
Now, there are creative ways to increase it, like, lets say there are two moons, perhaps in Trojan points to each other, and they both spiral in gradually. Or, lets say a passing object of greater mass flies past, but the problem with a passing object is that, due to escape velocity speed, such an object, if it passes within the Roche Limit, it would have a highly elliptical orbit, which wouldn't lend itself to a ring system, since the momentum of the elliptical orbit would only pass through and not stay inside the Roche sphere. What you need for a good sized ring system to form is a slowly decaying circular orbit, not a recent capture of a large passing object.
See Shoemaker Levy 9 which passed through but quickly went back outside Jupiter's Roche limit.
Now if we imagine a scenario of a double planet, which is probably a rare scenario but not impossible, and over time due to proximity and tidal forces, the two planets form a decaying circular orbit around each other, in this theoretical, lets say we have two heavy Jupiter orbiting each other, one of 12 Jupiter masses and the other of 6 Jupiter masses (purely theoretical) and the 6 Jupiter mass planet begins to break up as it enters the Roche limit of the 12 Jupiter mass one. There's 2 problems with assuming you'd get a ring with half the mass of the planet. One is, hydrogen and helium gas are likely at least 80% of the mass of the planet that's breaking apart, perhaps 90% and hydrogen and helium don't easily bind into ice particles, so over time, much of that gas is likely to get blown away by the solar wind. You're left with a rocky and icy mass of quite a bit less than 6 Jupiter masses, probably less than 1. The other problem, with an orbiting object that large, it doesn't break apart all at once, but it's denser core stays together and spirals closer to the planet while the lighter ices around the surface which do begin to form the ring, can get spun off and flung either into the planet or flung outside the Roche limit, as the denser core of the smaller of the two planet moved slowly closer, there would be a vacuum cleaner effect wrecking havoc on the very same ring that planet was forming. For smaller moons, this effect can be seen around saturn as tiny moons create tiny breaks in Saturns' rings. With a much more massive core of the planet that was forming a moon, you'd get orbital chaos and it wouldn't be a good scenario to form a ring, even with all that available ring material. You'd still probably end up with a ring, but I think only a small percentage of the original smaller planet's mass would survive the process.
A similar problem arises with giant impacts. If the impact is too large, the planet breaks apart. If it's not quite that large, like the giant impact on earth was thought to be, 4.4 billion years ago, then debris is blown outside the Roche Limit and forms a moon, in our case 1/81st the mass of the earth, though at the time it might have been a bit more, maybe 1/72-74 or so, and there were probably two moons initially not one, but I digress. The point is, to have debris blown off the planet but staying inside the Roche limit so it forms a ring, not a moon, you need a smaller impact than the one that formed our moon, and a smaller impact implies less debris, so with Rocky worlds, what does that mean, 1/100th? 1/200th? In there somewhere. With gas giants the impact method is even worse due to the outer layer of gas giants being so much hydrogen that you don't get good material for a dense permanent ring structure from giant impact.
So, there are practical limits to the size of a ring system you're likely to see (if we ignore young solar-systems still information like J1407b. It's a very ballpark just barely educated guess, but I think the practical limit for a ring system is probably pretty tiny compared to the mass of the planet, like a ratio of 1 to 200 or so, which if you have a planet the mass of 13 Jupiters, that's still quite a bit of mass. If we use the 1 to 200 ratio and 13 jupiters, that's the mass of 20 earths. I have a very hard time seeing how a ring system around a planet could get much more massive than that.
Now, in theory, like, lets say we want to build a ring system, and we design this enormous snow blower and we blow ice crystals around a planet, just for fun. A ring system would probably remain stable well beyond that mass. I don't have the means to calculate where instability might come into play, but if you build your own ring system around a planet, you might be able to get the ring system as massive as 1/10th the mass of the planet, maybe a bit more before some kind of gravitational instability took over. I don't think you're ever likely to see that in a natural situation, but theoretically I think it could be done.
Now, to answer your questions:
does it depend on the mass of the planet?
absolutely. The mass of the planet (and it's density) determines the size of it's Roche limit, which defines how far the ring system can extend. As pointed out above, planets can have rings beyond the Roche limit but only faint ones. Dense/Thick rings only form inside the Roche Limit and the more massive the planet, the larger the Roche Limit.
presence/absence of moons?
Small moons don't matter much. Saturn has small moons inside it's rings and they create small breaks in it's ring system. Large moons, particularly if they are close to the planet, can create gravitational disruptions and wouldn't be good for a permanent ring system.
distance to the star or other parameters?
Beyond the frost line is best, cause that's where ices don't melt. Ices make up more mass of our solar system and probably most solar systems than rocky material and they break apart more easily, so statistically speaking, a ring system should do better far away from the sun, in our case, at least Jupiter Distance. Jupiter's enormous magnetic field might also not be long term ring friendly, so in addition to far from the sun you'd want a planet without too strong a magnetic field that's shooting high velocity charged particles through the ring. Here's a fun article about how Saturn's magnetic field erodes it's ring. Jupiter would melt any ice ring it had much faster than Saturn does.
Hope that wasn't too long and it's more my trying to work it out than a definitive answer, but until we get much better telescopes, there might not be a definitive answer to this one.