She could. I don't think she should, but she could. If she were to avoid debating O'Malley or Webb, then that would be unfairly hurting their candidacies and unfairly helping hers. She has name recognition - if people see her name on the ballot, and she hasn't had to defend her positions onstage, then they'll vote for her (in the primary, I mean). If O'Malley and Webb and others don't get a fair chance to take on her policies head on, then they'll get 2% or 1% (so exactly what they're polling at right now). They wouldn't have a chance to boost their poll numbers and have their opinions known.
I think if a candidate who is unanimously considered to be the frontrunner refuses to debate other candidates, the FEC or the DNC should intervene. There needs to be some regulation in place for that, so that candidates can't cruise to the nomination on name recognition alone and never have to defend their positions. Some sort of regulation that states if credible challengers exist, the candidates must debate. In 2000, Al Gore even debated Bill Bradley, and George W. Bush even debated John McCain, despite the fact neither challengers ever gained nearly enough momentum to win the nomination. If Hillary refused to debate Webb, O'Malley, Sanders, and Biden (looking increasingly unlikely that he runs though), then I would lose a huge amount of respect for her.
This isn't an issue where we need legal intervention.
A law could backfire, for example, by insisting that an incumbent President agree to primary debates with nobodies.
If a presidential contender face legitimate opposition, the refusal to engage in any debates will be a bad news story. So there will be plenty of incentives to agree to debates, without getting the FEC involved.