Brownian motion in a bath affected by an external harmonic potential