Only if they repent (seek the Lord’s forgiveness), and forsake their evil ways.
They cannot continue to be an axe murdering rapist their whole lives and say the believe on Jesus and still be saved.
When a person says "grace", do they mean...
(a) Seeking forgiveness of their sins and finding mercy so as to walk uprightly by obeying God's commands?
(b) They are not under any penalty of any kind of Law whatsoever and therefore they do not have to worry about obeying God's laws so much or worry about how sin can destroy their soul?
For if Law Alone Salvationism (without God's grace) was the focus then.... Yes; that would be wrong and that person would need God's grace by faith first. But Laws are not in conflict with God's grace through faith. Not at all. God's grace and works go hand in hand. Just read 1 John 1:7 and Hebrews 5:9. For the very purpose or reason Christ died for us was to make us holy, blameless (Ephesians 5:25-27) and zealous of good works (Titus 2:14). When a person in my mind says "Legalism" is bad it makes me think that they are finding a way to say that taking God's laws do not play a part in the salvation process or that they can turn God's grace into a license for immorality. Yes, there is an extreme form of Legalism like Law Alone Salvationism or taking a Law beyond what it was intended to the extreme whereby it hurts others (Thereby violating the greatest two commandments).
I understand some dictionaries say about the word legalism, but this is one of those cases where the word does not actually make any sense in what it says. The definition should be excessive legalism or ultra legalism. Obeying God alone is a part of the faith. When we have faith that is a part of God's commands. When we love, that is a part of God's commands. When we repent and receive grace, that is a part of God's commands. Yes, there may be times we may faulter or stumble on rare occasion in our early walk with God, but that is why 1 John 1:9 says we can confess our sins. Confessing of sins is just another way of saying.... "repent." God commands all men everywhere to repent. There it is again. God's laws. Even believing in Jesus is a commandment (See 1 John 3:23). Yes, there are exceptions to certain laws. There always was. That does not mean we are not upholding God's laws. Paul says he establishes the Law. Granted, primarily speaking, we are not under the contract of the Old Covenant as a whole but the New Covenant contract. So the commands we follow are primarily from the New Testament and not the Old Testament; For the Law has changed.