A Russian submarine was deployed alongside a spy ship to map critical undersea infrastructure around Ireland and Britain, it has emerged.