We present a detailed chemical analysis of 22 stars along the colour-magnitude sequence of the intermediate-age (1.7 Gyr) open cluster IC 4651, based on high-resolution, high S/N ratio spectra from UVES/VLT. IC 4651 thus becomes one of the few open clusters for which a detailed composition analysis exists for stars spanning 3.5 mag, from solar-type main- sequence stars to giants above the RGB clump. In a strict comparison with the Sun, we find for the cluster a well-defined Fe abundance of (Fe/H) = 0.10 ± 0.03 (internal errors), with a reddening E(b − y) = 0.091. We also derive abundances for the α elements Mg, Si, Ti, and Ca and find a moderate enhancement of the three former elements, in excellent agreement with the results for field stars of similar Fe abundance. Among the Fe group elements, Cr and Ni are slightly overabundant ((X/Fe) ∼ 0.05). As also observed in M 67, the Na abundance among the giants is more than 0.2 dex higher than in the dwarfs. We interpret this effect as real, and due to dredge-up of 23 Na in the giants. Four turnoff stars, all fairly rapid rotators (v sini ≥ 25 km s −1 ), appear to have higher (Fe/H) than the other stars; our tests show that, while a spurious enhancement of 0.1 dex can be produced by the effect of high rotation on our spectral analysis, this cannot explain the whole difference. These stars appear overabundant because we tend to overestimate their effective temperatures by forcing excitation equilibrium. Li abundances have been computed for all the stars and show a well-defined pattern: the Solar-type stars have an almost constant Li abundance, just below that of the Hyades, and the Li-dip is pronounced and well determined. Turnoff stars just above the dip have a cosmic Li abundance, but within a very small range of magnitudes (0.25 mag) higher on the turnoff ,t he Li level drops by more than a factor 10. This cannot be due just to dilution; rather some extra mixing is required. Among the giants, two probable clump stars show detectable Li, while all the other (likely) RGB stars do not - as is also observed in the similar cluster NGC 3680. None of these patterns can be explained by classical stellar evolution models. Again, some extra mixing is required. We show that rotating stellar models including the most recent developments for meridional circulation and turbulence by shear instabilities explain very well the behaviour of the abundance along the colour-magnitude diagram of IC 4651, including subgiant and giant phases. The possibility remains open that the giants exhibiting the highest abundances are actual RGB bump stars which have just been through the so-called lithium flash.