Many people use mantras while doing yoga. Does that mean that yoga is a part of Hinduism? If yes, does the inclusion of yoga in Hinduism have a basis in Hindu texts like the Vedas, Upanishads, etc.?
Yes, yoga is a core part of Hinduism just like meditation is a core part of yoga. Go through any Upanishad and you will find mention of some form of meditation there. For example, consider the following:
स्वदेहमरणिं कृत्वा प्रणवं चोत्तरारणिं ।
ध्याननिर्मथनाभ्यासाद्देवं पश्येन्निगूढवत्॥ [Sve. Up. - 1.14]
Making own body the lower wood, AUM is made the upper, Churning in meditation through practice, the divine is seen hidden under.
This verse from Svetasvetar Upanishad mentions the process of meditation using the mantra om. Similarly, other upanishads have also such mentions. Now if you are interested in the physical excercise part of the yoga, they are too a part of Hinduism and go under the six philosophies of Hinduism (sad darshana). Maharshi Patanjali was the founder of this school of thought and through his work Patnajali Yoga sutra he gave out different methods of Yoga.
So from these you can know that Yoga is actually a core part of Hinduism.
Yes, yoga has been mentioned explicitly in Hindu scriptures. Here is one example, from the Mahabharata, Adi Parva XCII:
Ashtaka asked, 'Who amongst these, O king, both exerting constantly like the Sun and the Moon, first attaineth to communion with Brahma, the ascetic or the man of knowledge?'
Yayati answered,'The wise, with the help of the Vedas and of Knowledge, having ascertained the visible universe to be illusory, instantly realises the Supreme Spirit as the sole existent independent essence. While they that devote themselves to Yoga meditation take time to acquire the same knowledge, for it is by practice alone that these latter divest themselves of the consciousness of quality. Hence the wise attain to salvation first. Then again if the person devoted to Yoga find not sufficient time in one life to attain success, being led astray by the attraction of the world, in his next life he is benefitted by the progress already achieved, for he devoteth himself regretfully to the pursuit of success. But the man of knowledge ever beholdeth the indesctructible unity, and, is, therefore, though steeped in wordly enjoyments, never affected by them at heart. Therefore, there is nothing to impede his salvation. He, however, who faileth to attain to knowledge, should yet devote himself to piety as dependent on action. But he that devoteth himself to such piety, moved thereto by desire of salvation, can never achieve success. His sacrifices bear no fruit and partake of the nature of cruelty. Piety which is dependent on action that proceedeth not from the desire of fruit, is, in the case of such men Yoga itself.'