BTW It doesn't matter if its a paycheck or not. No one is breaking the law. The bank has the right to charge a fee for the use of their services and to not cash a check for someone if they have reason to not want to.
If the bank says 'we don't cash checks for non account holders' then thats the policy of the bank. You might not like that bank, but thats how it goes.
If they have that policy, paycheck or not, go to your bank and deposit the item.
They might have a million bucks in their account, but the bank can still refuse to cash a check off of it for a non account holder.