You should take it out asap. Crickets can get quite nippy when they're hungry and one that size can easily overpower your frog. As for how it got there, I can only presume it hatched from an egg deposited by another cricket in the tank or it got in from outside.