Magnetization and 63Cu NMR-NQR relaxation measurements are used to study the superconducting fluctuations in YBa2Cu3O6+x (YBCO) oriented powders. In optimally doped YBCO the fluctuating negative magnetization M_{fl}(H,T) is rather well described by an anisotropic Ginzburg-Landau (GL) functional and the curves M_{fl}/sqrt{H} cross at Tc. In underdoped YBCO, instead, over a wide temperature range an anomalous diamagnetism is observed, stronger than in the optimally doped compound by about an order of magnitude. The field and temperature dependences of M_{fl} cannot be described either by an anisotropic GL functional or on the basis of scaling arguments. The anomalous diamagnetism is more pronounced in samples with a defined order in the Cu(1)O chains. The 63Cu(2) relaxation rate shows little, if any, field dependence in the vicinity of the transition temperature Tc(H=0). It is argued how the results in the underdoped compounds can be accounted for by the presence of charge inhomogeneities, favoured by chains ordering.