You normally need a 2' opening under the countertop, floor to counter. The DW is usually attached to the top, but some brackets can be modified to allow them to screw to the sides. Depending on where you live, the thing can either be hardwired (ideally to a dedicated circuit) or a cord can be installed and it can be plugged into an outlet (best to be dedicated). Water only requires hot, and a T connector with a separate shutoff shouldn't be too tough, but you'd have to see. An alternative is sometimes you can replace the current hot shutoff at the wall with a dual outlet one and feed the DW from that. You can use either soft copper to make the connection. Also, depending on where you live, you may want to or have to install an air gap for the drain of the DW into the countertop. Now, while it may not be required, this is the safest way. The alternative is (and there are millions that do it this way) is to just loop the drain hose from the DW up to the underside of the counter, and then to the disposer's DW inlet. If you do install a disposer, it too should have a separate power and is typically installed in a switched outlet. Make sure to knock out the plug and remove from the disposal on the DW tailpiece.
If your cabinets won't allow you to remove a 2' section, it would be really tough, and yes, unless your sink base has a wall, you'd need one there to block off the DW and to provide vertical support for the counter.
Note, the DW doesn't have to be right next to the sink...mine is a small U-shaped kitchen, and it is across from the sink and works fine for me. Running the drain and water was a little more challenging, but not horrible.