YES! Freediving is a very safe sport if it is practiced correctly. It is a natural activity, and the human body is very well capable of breath-holding and diving underwater. Taking an officially recognized freediving course will only make you a safer and a more confident freediver.
Accidents happen because of lack of proper training and education. Beware of bogus freediving coaches. Ask questions about their certification so that you will know that you are in safe with them.