The digital pots have a somewhat limited BW. The frequency range for ulrasound is quite large and it would only be the low end to work well with digital pots. Usually one does no need very fine adjustments and porpose build PGA type amplifiers with more corse gain steps may be the better solution.
For fine adjust some multiplying DACs are a good alternative too.
Many of the digital pots can float (no direct link to ground), but need to be used within the supply limites.