Lionel Messi returned to Inter Miami with a goal and an assist, but appeared to walk off the pitch in pain.