The Fano effect (U. Fano, Phys. Rev. 15, 1866(1961) shows that an inelastic scattering process can be suppressed when the output channel (OC) is coupled to an isolated bound state. In this paper we investigate the application of this effect for the suppression of two-body collisional losses of ultracold atoms. The Fano effect is originally derived via a first-order perturbation treatment for coupling between the incident channel (IC) and the OC. We generalize the Fano effect to systems with arbitrarily strong IC-OC couplings. We analytically prove that, in a system with one IC and one OC, when the inter-atomic interaction potentials are real functions of the inter-atomic distance, the exact s-wave inelastic scattering amplitude can always be suppressed to zero by coupling between the IC or the OC (or both of them) and an extra isolated bound state. We further show that when the low-energy inelastic collision between two ultracold atoms is suppressed by this effect, the real part of the elastic scattering length between the atoms is still possible to be much larger than the range of inter-atomic interaction. In addition, when open scattering channels are coupled to two bound states, with the help of the Fano effect, independent control of the elastic and inelastic scattering amplitudes of two ultracold atoms can be achieved. Possible experimental realizations of our scheme are also discussed.