I think it is possible, maybe even likely that you can make it, given no checked luggage and I think the Nexus card should give you Global Entry and pre-check TSA access after clearing Immigration and Customs. Dulles is normally my destination airport, so I don't have experience in the past decade changing planes there (it is possible to have a long walk to a connecting United gate), but with Global Entry, it is pretty quick normally to be out the door. Worst case, there is a later flight in the evening to Ottawa if your United flight from EDI is late or something otherwise messes up.