In some jurisdictions, there may be required to ride at a certain distance from cars. If there's a lane marking between the travel lane and the parking lane, you may be required to ride on the travel side of the line.
Beyond these possible requirements, yes, the motorist who opens the door is supposed to excercise reasonable care, and not open his door into the path of travel of another vehicle. But as others have pointed out, this is only academic, if you're the cyclist who gets doored. Even if you don't get killed or maimed, all too often a motorist is presumed to be in the right when the other party is not a motorist.