The law is based on when the ball is played. Not when it is received.
Yes it is, and if you receive in their half you would be offside unless it was deemed another phase of play.
But if you are in your own half when you receive it then you are onside, regardless of where you were when it was played.