Dynamical detection of a companion driving a spiral arm in a protoplanetary disk