We find even within scripture that there existed a heathen practice of cutting the flesh as part of an attempt to appeal to the gods, a kind of unholy sacrifice if you will.
So they shouted louder and slashed themselves with swords and spears, as was their custom, until their blood flowed. (NIV 1 Kings 18:28)
There are other references to cuttings ones hair and beard in certain shapes and tattooing in this verse you mention that are within the same context.
“‘Do not cut the hair at the sides of your head or clip off the edges of your beard.
“‘Do not cut your bodies for the dead or put tattoo marks on yourselves. I am the Lord. (NIV, Leviticus 19:27-28)
It is a reasonable rule of exegesis that once a context is established we assume it continues as a context to be used until there is a clear break into a new context. Therefore contextually I would argue that the reference to tattooing is also so as 'not to be like those' who do these things as part of their idolatry worship and ceremonies. Cutting your beard, possibly so that your hair and facial hair is round like the sun, is bad in the context of say 'Sun worship', but clipping your beard outside of this context does not have a direct scriptural reference opposed to it. In the same way, if we are trying to find out if tattooing as a fashion, unrelated to idolatry, is right or wrong, I do not think this verse gives us any direct guidance. By ignoring context we would be potentially spinning our 'Bible roulette wheel' to see where it lands almost superstitiously.
Note: I have no tattoos nor does anyone in my family. I am answering from what I think the textual considerations should be. I personally dislike tattoos but not upon any direct religious ground.
related post: Pagan hairstyle forbidden in Leviticus 19, who had it?