Not sure what you consider might be 'unsafe' about heading from 20-30m depth to the surface - are you thinking about decompression stops as happens for scuba diving? If so, the need for that comes from breathing pressurised gas over a longer period of time - which you're not doing if you hold your breath for only a minute or so.
Consequently, decompression isn't an issue for freediving (unless you're reaching depths like 100m or so, over several dives in a fairly short period of time - and pro freedivers don't really train that way any more, typically only doing a single dive to such depths occasionally, having other ways to train for that instead).
You're more likely to hit issues with narcosis before suffering from decompression issues when freediving - but that'd still be at way deeper than only 30m.
Having said all that, I think there are some potential issues that you
should consider...
- first of all, when freediving you wouldn't want to "rush for the surface", since that exertion will likely use up your precious O2 more quickly, leading to the potential for blackout on reaching the surface - ideally you would instead keep a steady, relaxed pace (during both ascent & descent - typical speed is very roughly 1m/s), and learn to stay relaxed as the urge to breathe increases;
- secondly, if you might be starting to get hypoxic when coming up from 30m or so, you should make sure you know how to do recovery breaths to restore your oxygen quickly (you should really practice that anyway, even if you're not that hypoxic from 30m);
- finally, 30m is potentially reaching the residual volume of your lungs - and that can lead to lung/trachea squeeze if you're not careful about how you move while down there.
I'm assuming, of course, that you're doing all this with a buddy who is capable of reaching the same depths as you and knows how to rescue & recover you if you do blackout (and that you also know how to do the same for your buddy if necessary)...
I'd urge you to take a freediving course so you know about how to stay safe while enjoying your freediving.