It's one or the other, I'm afraid - there is a listing describing which actions are "shared" and which are independent., and while movement can be done by both ranger and companion, and in different directions if you like, attacks come from either the ranger or the beast.