Inhomogeneous Galton-Watson branching mechanisms with immigration are investigated, where the offspring mean tends to its critical value, the offspring variance tends to zero, and the rates of convergences depend on time in both cases. A functional central limit theorem is proved and it is shown that the limit is an inhomogeneous Ornstein-Uhlenbeck type diffusion. The result is applied for simulation of Ornstein-Uhlenbeck type diffusions by Bernoulli trials.