According to Catholicism, is marrying a woman who had children out of wedlock a sin? I am assuming here that marrying a divorced woman is a sin, according to the Sermon on the Mount.

If that is the case, what about a woman who had a child but never married?

Is the child’s father still considered the woman’s “master”? I mean, sex was one of the ways of acquiring a wife back in the day. And their flesh was joined together. So let no man separate that?

What is the view of Catholicism on this?
Traditional Catholic here. 

To answer your main question, no, it is not a sin to marry someone who had children previously out of wedlock. The husband would be taking on the duties of fathering them by making her his wife. And perhaps the woman had not even sinned either: she might have been raped.  

The fact of impregnating a woman does not make her a man's wife, much less merely having sexual intercourse with her.  The Scripture is "Let no man separate what God has joined together." God does not "join together" apart from marriage.  

The Church has never taught that a man becomes a woman's "master" by having sex with her.  This is grotesque. (The husband is, of course, the head of the family, but that's a different matter.)  

Marrying a divorced woman is a sin given that she was actually already married. For example, if she was a baptised Catholic, she had to have been married in the Church. (Details in The Code of Canon Law under Matrimony)  If not, her previous "marriage" was never valid (but it still has to be annuled). For anyone (since the Church also recognizes marriages of non-Catholics) there has to be mutual consent, the intention to have children, and the belief that divorce is never an option, et al.  Indeed, according to the Church, many people are not actually married today, neither sacramentally nor naturally.

Update: Korvin edited the last sentence above to include "(in the sacramental sense)." I politely re-edit this because it is not only that most people are not receiving the sacrament of Matrimony, but in fact many are not marrying even in the natural sense (called "natural marriage"). As I wrote, for anyone entering into marriage, natural or sacramental, there are certain conditions, as they pertain to the very definition of marriage. For example, the primary purpose of marriage is to have children. Therefore, if a couple gets "married" but expressly decides beforehand to not have children, they do not contract a valid marriage, according to the Church. The Catechism of Trent distinguishes between the two types of marriage but retains the same basic definition for both: "For as marriage, as a natural union, was instituted from the beginning to propagate the human race..." (http://www.catholicapologetics.info/thechurch/catechism/Holy7Sacraments-Matrimony.shtml)

Most of these teachings can be found in the Catechism, articles 1601 through 1666.  The above is a summary of orthodox Catholic teaching, which you can confirm for yourself using serious sources.