Yes, mercenary soldiers were fairly common in "medieval times". From around the 12th century mercenaries started organizing into independent companies. this was a significant source of manpower for many warring parties in the era. The golden age of mercenary warfare is generally cosidered to be 14th century Italy where mercenary warfare was the norm.
Just how common it was depends a little on what specific time period and region you want to look at. If you have more specific questions, feel free to ask or you can have a look at some of the previous stuff I've written about mercenaries in Europe.
On the business model, general organization and problems that come with mercenaries
In our understanding, the answer is a categoric yes. You can find countless, consistent examples over multiple centuries in different parts of Europe. However, the people at the time would have viewed the question with much more nuance. Although it's fair to say that there was a general preference for "local" or "native" soldiery with social and cultural ties to the polity they were fighting for, this was seldom an emphatic or limiting consideration. In fact, under certain circumstances it could be thrown out altogether.
Not to discourage further discussion, but you might be interested in this similar question I answered through the Medieval Italian lens earlier this year. In short, because of the particularly decentralized power structures in Medieval Italy, the issue is particularly muddled.