No, you can buy them from different companies as long as you can configure them to work together. However, note that most managed hosting services include a free domain even in their basic plans.