Ratios of the ψ′ over the J/ψ production cross sections in the dilepton channel for C, Ti and W targets have been measured in 920 GeV proton-nucleus interactions with the HERA-B detector at the HERA storage ring. The ψ′ and J/ψ states were reconstructed in both the μ+μ- and the e+e- decay modes. The measurements covered the kinematic range -0.35≤xF≤0.1 with transverse momentum pT≤4.5 GeV/c. The angular dependence of the ratio has been used to measure the difference of the ψ′ and J/ψ polarization. All results for the muon and electron decay channels are in good agreement: their ratio, averaged over all events, is Rψ′(μ)/Rψ′(e)=1.00±0.08±0.04. This result constitutes a new, direct experimental constraint on the double ratio of branching fractions, (B′(μ)B(e))/(B(μ)B′(e)), of ψ′ and J/ψ in the two channels. The ψ′ to J/ψ production ratio is almost constant in the covered xF range and shows a slow increase with pT.