As long as you have enough danios in a school so that they are not aggressive towards the ram. A school of at least 6 is recommended for the danios.
Not sure about your tank size or what's in it, but Bolivian rams need cooler water in a mature, fully cycled, well-planted tank. They are, in my experience, shy and non-aggressive cichlids that need a minimum of 20 gallons.