That depends on the token contract. Most token contracts only allows the owner of the tokens to make a transfer or approve a transfer.
For example if contract A own some tokens, only contract A can make a transfer, or approve a third party to make a transfer on behalf of A. But if the contract A is not programmed to make token transfers then those tokens are effectively locked inside the contract.
There is a post on Ethereum's reddit where they show how some contracts have locked important amounts inside them. More recent tokens have included some type of protection so the team can unlock tokens send to them unintentionally.
A token contract can allow a super user (ie a contract owner) to arbitrarily make a transfer. I've seen a contract to allows arbitrary transfer of tokens after one year if the tokens were under dispute. But it is very rare.