As in your case, they should be given freedom as they need to live in their world i.e. the river or sea. From their view, they are denied freedom but actually, it's their life that is in danger. It can be that they can be left to themselves to decide what they choose.
If we think deeply if connecting with humans, our parents are protective and would not want us to be safe and sound but we would want freedom. We are humans with brains that can think but what abt animals or other things, we cannot compare them with humans and say that freedom is best for them.
“The most important thing in life is to learn how to give out love, and to let it come in." — Morrie Schwartz
No doubt safety is important. But living with freedom and living on our own will definitely be much better than confining ourselves and depending on somebody for food. I always feel that animals should have their own freedom and we should not restrict their moment. OK. Out of our interest, we are trying to have pets in the house but definitely, we are snatching away the freedom of such animals.
K Mohan @ Moga
'Idhuvum Kadandhu Pogum "
Even this challenging situation would ease
I would say that safety -safety of person and personal belongings is a priority. When we feel really safe we are half or maximum happy. Nothing will give us happiness if we are in danger and fear for our safety. Humans will be ready to exchange anything for the self safety. Even hunger comes next at that situation.
Knowledge is power.
I am very fond of the movie called "Finding Nemo" an animated movie and its sequel called "finding Dory" which I watched when I was in class 6th and still love it has a perfect depiction of what the author has described here.
I guess any creature will go for happiness rather than safety only if the creature knows what happiness feels like.
"It is hardest thing in the world to be good thinker without being a good self examiner"