It may matter less whether you are a lawyer than whether your answers in themselves constitute legal advice. While attorneys can get in trouble for providing bad legal advice, my lay understanding is that you can get in trouble for providing legal advice at all if you are not licensed to practice law.
This is an issue that, as you might expect, has come up once or twice before; in particular, it has been a topic of some conversation on Law SE. As jimsug points out in this answer on their Meta site, SE has several pages of legal disclaimers, accessible via the "legal" link in the global footer. A related question on the main Law site asks, Does a boilerplate legal disclaimer protect authors of content on a website?
Users of Law SE seem to have reached a consensus in feeling that the pages of disclaimers linked in the footer, designed as they are to protect Stack Exchange as an organization, are not sufficient to protect users and content creators on the network. For this reason, and because there was an expectation that many or most answers on Law SE would run into this problem, SE added a General Disclaimer page to the Law SE Help Center.
Now, all the background aside: You are not obligated to say that you are or are not a lawyer when you answer a question. However, it may be prudent to disclaim that you are offering legal advice when you feel your statements are at all likely to be relied upon by someone as legal advice. The best place to do this is right in the body of the answer.
It doesn't necessarily matter if they would be correct or smart to interpret your words as legal advice. The applicable principle is something more like, "would it be reasonable?" and that's a judgment call. Meaning, even if I were an attorney myself, I couldn't tell you exactly where the line is between legal advice and legal information (the apparent term of art for things that fall short of legal advice).
Can you just put it in your profile? Sure, as before, it's up to you how and whether to disclaim. But as you may already suspect, how visible the disclaimer is will affect the judgment of whether or not it's reasonable to expect that someone will have seen the disclaimer when they read your statements. Personally, I have no such expectation. Based on the view counts in active users' profiles, I expect the vast majority of people who read an answer on Stack Exchange never read the author's profile. If this is actually the case, I don't see how a disclaimer in your profile would be at all effective.
If you really don't like putting those disclaimers on your answers, you could also adjust how and what you claim in an answer. Stick to well-cited statements of fact where possible. Leave all decisions full in the hands of the reader. If you have a feeling about something, or a personal preference, make sure to say my preference is to do this and not you should do this or you can get such-and-such outcome by doing this.