Is it possible to be dehydrated and bloated/retaining water at the same time?

Yes. It is possible to have edema (swelling in the ankles/legs) due to fluid retention and at the same time have intravascular volume contraction. This is a common occurrence in heart failure, cirrhosis, and nephrotic syndrome where serum albumen is low & powerful diuretics are used. It's less likely but possible in healthy people. Venous insufficiency with dehydration is an example.