What you're talking about isn't evolution. Evolution, by definition, occurs over an entire species as individuals with a greater capacity to survive are able to reproduce.
An organism could have evolved to adapt to specific changes in its environment, provided its ancestors experienced those changes frequently, but they cannot innovate new changes. Some fish can change from fresh water to salt water physiology, for example, because their ancestors lived in a changing environment where being able to adapt to both environments was beneficial and therefore the ones who had that ability already passed it on to their children. But an individual from such a species cannot spontaneously develop the ability to live in acid if their species has never needed to before.
The only adaptation that is capable of making new innovations within a single individual's lifespan is intelligence - in fact, this is the whole point of intelligence. It is thought to be the reason why octopuses, a non-social species, are relatively intelligent - they live in complex, unpredictably changing environments where being able to adapt to new food sources and avoid new predators is important. (Social animals also often develop intelligence because they live in a complex, changing environment consisting of other members of their own species.)
For an organism to physically change its body in response to novel circumstances, it would need to have conscious control over almost every aspect of its physiology, from its chemistry to its body structure.
In space, raw materials are rare but (if you're close to a star) energy can be abundant. It may be worthwhile for a space creature to be intelligent, as it can use sunlight to power its brain, and will need to calculate precise trajectories in order to propel itself to new food sources, which will be used mainly to acquire the mass it needs for reproduction. It may also cannibalize parts of its own body to acquire precious mass, and could choose to grow new limbs in different ways. This process would use a lot of energy, so it should do so only when it is near a star.