Can a space marine chapter consist of marines from other chapters?
Yes.

The requirement is that your army all share a keyword, for space marines that could be simply Adeptus Astartes, but you could go further than that to use any Imperal troop or vehicle. You cannot mix beyond that, no adding Eldar to your imperial force, they do not share any keywords.

There are downsides to this. As more chapter specific codices are released, you could find some of the choices only really benefit your say Space Wolves, but not your Ultramarines. You could have options that only benefit your Adeptus Astartes, but not your Imperial Guard.