As the cohomology of $(S^1)^n$ is torsion free every stable bundle on $(S^1)^n$ is
determined by Chern classes (this also follows from the $K$-theory Künneth
formula) so just as for the spheres it is an unstable problem. As for the
unstable problem unless I have miscalculated, if $(S^1)^5\rightarrow S^5$ is a
degree $1$ map, then the pullback of the non-trivial $U(2)$ bundle on $S^5$ with
trivial Chern class is non-trivial. (The proof uses that the $5$'th step in the
Postnikov tower of $\mathrm{BU}(2)$ is a principal fibration $K(\mathbb
Z/2,5)\rightarrow U\rightarrow K(\mathbb Z,4)\times K(\mathbb Z,2)$.)
Some more details of the calculation: The first and second Chern class gives a
map
$$\mathrm{BU}(2)\rightarrow K((\mathbb Z,4)\times K(\mathbb Z,2)$$
which induces an isomorphism on homotopy groups in degrees up to $4$. As
$\pi_i(\mathrm{BU}(2))=\pi_{i-1}(\mathrm{SU}(2))$ for $i>2$ we get that
$\pi_5(\mathrm{BU}(2))=\pi_4(S^3)=\mathbb Z/2$. Hence, the next step $U$ in the
Postnikov tower of $\mathrm{BU}(2)$ is the pullback of the path space fibration
of a morphism $K(\mathbb Z,4)\times K(\mathbb Z,2)\rightarrow K(\mathbb Z/2,6)$.
In particular we have a principal fibration
$$K(\mathbb Z/2,5)\rightarrow
U\rightarrow K(\mathbb Z,4)\times K(\mathbb Z,2).$$
This means that for any space
$X$, the image of $[X,K(\mathbb Z/2,5)]$ in $[X,U]$ is in bijection with the
cokernel of $[X,K(\mathbb Z,3)\times K(\mathbb Z,1)]\rightarrow[X,K(\mathbb
Z/2,5)]$ obtained by applying $[X,-]$ to the looping of the structure map
$K(\mathbb Z,4)\times K(\mathbb Z,2)\rightarrow K(\mathbb Z/2,6)$. As
$H^4(K(\mathbb Z,3),\mathbb Z/2)=0$ the Künneth formula shows that any map
$K(\mathbb Z,3)\times K(\mathbb Z,1)\rightarrow K(\mathbb Z/2,5)$ factors
through the projection $K(\mathbb Z,3)\times K(\mathbb Z,1)\rightarrow K(\mathbb
Z,3)$ and $H^5(K(\mathbb Z,3),\mathbb Z/2)=\mathbb Z/2\mathrm{Sq}^2\rho\iota$ (where
$\iota$ is the canonical class, $\iota\in H^3(K(\mathbb Z,3),\mathbb Z)$ and
$\rho$ is induced by the reduction $\mathbb Z\rightarrow\mathbb Z/2$). Hence,
the map $[X,K(\mathbb Z,3)\times K(\mathbb Z,1)]\rightarrow[X,K(\mathbb
Z/2,5)]$ is either the zero map or given by the composite of the projection to
$H^3(X,\mathbb Z)$, the reduction to $\mathbb Z/2$ coefficients and
$\mathrm{Sq}^2$ (I actually think it is non-zero as otherwise the cohomology of
$H^\ast(\mathrm{BU}(2),\mathbb Z)$ would have $2$-torsion). If we apply it to
$X=(S^1)^5$ we get that $[X,K(\mathbb Z,3)\times K(\mathbb Z,1)]\rightarrow[X,K(\mathbb
Z/2,5)]$ is zero provided that
$$\mathrm{Sq}^2\colon H^3((S^1)^5,\mathbb
Z/2)\rightarrow H^5((S^1)^5,\mathbb
Z/2)$$
is zero. However, all Steenrod squares are zero on all of
$H^*((S^1)^n,\mathbb Z/2)$. Indeed, the Künneth and Cartan formulas reduce this to
$n=1$ where it is obvious.
The answer (to both questions (a) and (b)) is YES (assuming $B$ is a smooth manifold). A proof can be found on Walschap's book "Metric Structures in Differential geometry", p. 77, Lemma 7.1.
For the OP's convenience, here's a sketch of the proof. Choose an open cover of $B$ such that your vector bundle is trivial over each element. From general results in topology, this (and in fact any) cover of an $n$-dim manifold $B$ admits a refinement $\{ V_\alpha\}_{\alpha\in A}$ such that any point in $B$ belong to at most $n+1$ $V_\alpha$'s. Let $\{\phi_\alpha\}$ be a partition of unity subordinate to this cover and denote by $A_i$ the collection of subsets of $A$ with $i+1$ elements. Given $a=\{\alpha_0,\dots,\alpha_i\}\in A_i$, denote by $W_a$ the set consisting of those $b\in B$ such that $\phi_\alpha(b)\lt\phi_{\alpha_0}(b),\dots,\phi_{\alpha_i}(b)$ for all $\alpha\neq\alpha_0,\dots,\alpha_i$. Then the collection of $n+1$ open subsets $U_i:=\cup_{a\in A_i} W_a$ covers $B$ and is such that your bundle restricted to each $U_i$ is trivial.
Best Answer
As Igor Belegradek showed in the comments, one could find an example by finding a CW-complex $X$ and a map $X \to BO(n)$ which is not nullhomotopic, but where the restriction to every finite subcomplex is nullhomotopic. Such a map is called a phantom map. The question "is this map nullhomotopic?" has the same answer whether or not we are asking our maps to preserve the basepoint, and so I will take some steps that are casual about basepoints.
For our example, we're going to take $n = 3$ and $X = \Sigma \mathbb{CP}^\infty$, the suspension of $\mathbb{CP}^\infty$. This is a CW-complex whose finite subcomplexes are $\Sigma \mathbb{CP}^n$.
These spaces are simply connected, so $[\Sigma \mathbb{CP}^n, BO(3)] = [\Sigma \mathbb{CP}^n, BSO(3)]$ for all $n \leq \infty$.
Then $[\Sigma \mathbb{CP}^n,BSO(3)] = [\mathbb{CP}^n, SO(3)]$ for all $n \leq \infty$ by the loop-suspension adjunction. ("A vector bundle on a suspension is determined by a clutching function.")
We can also identify $SO(3)$ with $\mathbb{RP}^3$, which has $S^3$ as a double cover. Again because $\mathbb{CP}^n$ is simply connected, $[\mathbb{CP}^n,SO(3)] = [\mathbb{CP}^n, S^3]$ for all $n \leq \infty$.
One of the famous examples of phantom maps is a map constructed by Brayton Gray: a map $\mathbb{CP}^\infty \to S^3$ which is not nullhomotopic, but where the restriction to $\mathbb{CP}^n$ is nullhomotopic for any $n$. (I believe that this is in his paper "Spaces of the same $n$-type, for all $n$", and that a proof can be given using Milnor's $\lim^1$ sequence.) Pushing this back, we get a vector bundle on $\Sigma \mathbb{CP}^\infty$ whose restriction to any finite subcomplex is trivial.