Seamless underwear in your skin tone or the dress's color, cut higher on the hip than regular styles, is the standard answer for avoiding visible lines.
Thong vs. Seamless Full Coverage
A thong eliminates back panty lines entirely. If that's not your preference, look for "seamless" or "laser cut" briefs, the edges are bonded instead of stitched, which is what actually shows through fabric.
Shapewear Is Optional, Not Required
Light shapewear can smooth a silhouette, but it's a comfort choice, not a fix for a dress that doesn't fit. If you need heavy compression to feel good in a piece, try a size up first.
Color Matching
Match underwear to your skin tone for lighter dresses, and to the dress color for darker, more opaque fabric where visibility is less of a concern.