The Royal Bank of Canada has confirmed a deal to acquire the Canadian auto finance and deposit business of Ally Financial Inc.