Context. The ion cyclotron (IC) wave has been discussed in the literature in the context of the solar coronal heating. This is partly due to the necessity of explaining the observed preferential heating in the direction perpendicular to magnetic field lines. Observations have also shown the existence of filamentary density structures of various cross sections in the solar atmosphere. The presence of the related density gradients implies the possibility for the development of drift wave (DW) instability. Aims. The frequencies of the two modes (IC and DW) are usually well separated, however, they can become close to each other for short inhomogeneity scale lengths of the equilibrium density. In this case, the drift wave can effectively couple to the ion cyclotron mode, and in the present work we want to demonstrate this coupling in the parameter domain relevant for the solar corona. Methods. Well-known analytical results which follow from the kinetic theory are used and the dispersion equation, which describes coupled ion cyclotron and drift waves, is solved numerically. Results. The numerical results obtained by using the values for the plasma density, magnetic field and temperature applicable to the solar corona clearly show the coupling and the instability (growing) of the two modes. The coupling happens at very short wavelengths, that are of the order of the ion gyro radius, and for characteristic scale lengths of the equilibrium density that are altitude dependent and may become of the order of only a few meters. Conclusions. The demonstrated instability of the two coupled modes (driven by the equilibrium density gradient) is obtained by using a rigorous kinetic theory model and for realistic parameter values. The physical mechanism which is behind the coupling is simple and is expected to take place throughout the solar atmosphere and the solar wind which contain a variety of very elongated density structures of various sizes. The mode grows on account of the density gradient, it is essentially an ion mode, and its further dissipation should result in an increased ion heating.