A sixline wrasse can be a terror in general. Both the wrasse and the dottyback (and gramma too) have similar shapes, can serve somewhat similar ecological niches, occupy the same area of the water column and thus compete for space/food. This can work in larger tanks on occasion that are more "busy" (other tankmates for example). Sometimes you will get lucky mixing wrasse and dottyback but a sixline has a bad reputation for a reason. They often start off with good temperaments and then devolve in to terrors, later.
I would not be purchasing from a LFS which gave me that advice. Some have mentioned that a 20G is too small (and it is below ideal tank size) but IME sixline don't seem to mind tanks this size. It is the tankmates that share the space that will mind as sixline are quite terrirotorial. Many fish are more territorial in smaller quarters.
Best of luck to you. I hope the dottyback is OK but if I were you I'd return the sixline to the LFS. Other suitable tankmates would be a firefish, bangai or pajama cardinal, smaller gobies such as neon, clown, perhaps even watchman gobies, smaller clownfish such as occellaris clownfish, etc. Some recommend damsels for their obvious smaller size but they can be quite aggressive. They're very budget-friendly until they harm newcomers to the tank, later. However, there are a few that are mild-mannered (chrysiptera genus damsels) and can make great additions such as azure, talbots, starck's, rolland damsels. Yellowtail can be docile but there are those that decide to be aggressive. Springer's damsels are also docile and can be quite useful to wipe out pests such as flatworms.
It is important to note that while I suggested clownfish for their tolerance for smaller tanks, they are also quite territorial and can be quite aggressive - particularly if they pair up. A single clown may be a better alternative and more active within the tank.