Dynamic Obstacle Avoidance through Uncertainty-Based Adaptive Planning with Diffusion