Freelancer ID can be hired to escort as per ID rules that overwrite bounty rules:
Can fulfill any bounty and escort contracts, and may treat transports as combat targets when executing a bounty or escort contract against them.
However, as Drobbe stated, Freelancer ID cannot help Pirate ID in piracy encounters. Arguing that Freelancer ID is hired to escort Pirate ID is stupid beyond reason. If that Pirate IDed ship is ferrying goods or traversing area, then it can be legit. But not while actively pirating as that is essentially hiring to assist in piracy.