I think that what you say is not complitely correct: the local anomaly is the curvature of the connection, which can be non-trivial wether the bundle is trivial or not. The global anomaly is the holonomy of the connection, which can be non-vanishing even for flat connections. In fact, considering the case of a line bundle, in order not to have an anomaly, you must be able to write a section as a function on the base-space, up to an overall constant. Therefore, if you have a trivial holonomy, you can choose a global parallel section (up to a constant), and any other section, divided by the flat one, gives a function. If the curvature is zero but not the holonomy, you can do this only locally, therefore there is a global anomaly but not a local one.
For the example you require, let us consider the trivial line bundle $X \times \mathbb{C}$: any global 1-form $A: TX \rightarrow \mathbb{R}$ gives a connection defined by $\nabla_{X}V = A(X) \cdot V$$\nabla_{X}V = \partial_{X}V + A(X) \cdot V$. The curvature is $F = dA$, which is trivial in cohomology, but not as a single form in general. Therefore, if $A$ is not closed, you have a local anomaly even on the trivial bundle. If $dA = 0$, you can project it to a cohomology class in $H^{1}(X,\mathbb{R}/\mathbb{Z})$, and this class is the flat holonomy. For example, if $X = S^{1}$, for any global 1-form $A$ which is not integral, i.e. such that $\int_{S^{1}}A \notin \mathbb{Z}$ ($A = \alpha dt$ with $\alpha \notin \mathbb{Z}$), you have a global anomaly but not a local one. This can happen not only on the trivial line bundle, but also on a line bundle with torsion first Chern class. For higher-dimensional vector bundles the picture is analogous.