It is true that if connection $\omega$ in a vector bundle is $\mathfrak{g}$-valued ($\mathfrak{g}$ being Lie Algebra of the structure Lie Group $G$) in a patch $U$, then it will be $\mathfrak{g}$-valued in all other patches due to the transformation law:
\begin{align} \omega_V = c^{-1}_{UV} \omega_U c_{UV} + c^{-1}_{UV} d c_{UV}. \end{align}
However, I'm trying to understand if it must take values in Lie algebra in order to be a connection?
Yes, your connection needs to be valued in the Lie algebra $\mathfrak g$ of a Lie group $G$ which is the structure group of your bundle ($ G = GL(n)$ for a rank-$n$ vector bundle, $G = O(n)$ for a rank-$n$ real vector bundle with metric, etc). Here is the intuition behind that:
You choose some patch $U$ and use a local trivialization to write your vector bundle as $V \mid_U \cong U \times \mathbb R^n$. Via this local trivialization, you have identified all the fibers $V_x, x \in U$ with $\mathbb R^n$. So now you can write sections of $V$ over $U$ as $\mathbb R^n$-valued functions and multivariable calculus tells you how to take partial derivatives along given directions.
But you should not just naively start taking partial derivatives of the individual components of a section. There are many possible trivializations of $V$ over $U$, and if your friend chooses a different trivialization and you both take partial derivatives in the naive way, you will disagree with each other. This is why we need covariant derivatives.
So the connection enters: We recognize that in addition to the naive recipe for taking partial derivatives, we need to add on a "rotation" of the section as we take derivatives along a given direction. So say that at the point $x\in U$ we want to take a covariant derivative along the $X \in T_xM$ direction (and say $s$ is our section over $U$): We take "naive" multivariable calculus derivatives of the components of $s$ in the $X$ direction and then we ask our Lie algebra-valued connection 1-form $\omega$ how we should "rotate" $s$ in order to make the derivative covariant.
Now $\omega$ eats the tangent direction $X$ and gives us a Lie algebra element, $\omega(X) \in \mathfrak g$. Elements of $\mathfrak g$ are (intuitively speaking) infinitesimal "rotations," where "rotation" means "element of $G$." So we act on $s$ by the infinitesimal rotation $\omega(X)$ and we add the result to the "naive derivative" of $s$ along the $X$-direction.
(Above "let $\omega(X)$ act on $s$" meant implicitly that we have fixed some representation of $G$ on the fibers of $V$ so that an expression like $\omega(X) s$ makes sense.)
So the concise answer: $\omega$ has to be Lie-algebra valued because its job is to specify infinitesimal rotations that we add to the usual partial derivatives in order to make the derivative covariant.
I haven't attempted to convince you that this procedure will resolve the original difficulty of consistently defining derivatives of sections despite multiple ways of trivializing $V$ over $U$, but that's the essence of the transformation law you wrote down. If you'd like I could edit this answer with more detail along those lines.
I haven't read your reference by Frankel but I recommend that you additionally look at DuPont's Fibre Bundles and Chern-Weil Theory.