The answer is essentially given in the comments, so let me summarize:

1. It is a frequent situation that one has to cite an exercise.

2. It is legitimate.

3. The best thing is to cite a place where the statement is proved, but if you cannot find such a place, citing an exercise is the second best choice.

4. You can solve the exercise in your paper, or not solve (depending on the difficulty of the exercise and space limitations and other considerations).

And finally my own recommendation: When you refer to an exercise, solve it yourself, no matter whether you include a solution to your paper or not.