A nonlocal Cahn-Hilliard model with a nonsmooth potential of double-well obstacle type that promotes sharp interfaces in the solution is presented. To capture long-range interactions between particles, a nonlocal Ginzburg-Landau energy functional is defined which recovers the classical (local) model for vanishing nonlocal interactions. In contrast to the local Cahn-Hilliard problem that always leads to diffuse interfaces, the proposed nonlocal model can lead to a strict separation into pure phases of the substance. Here, the lack of smoothness of the potential is essential to guarantee the aforementioned sharp-interface property. Mathematically, this introduces additional inequality constraints that, in a weak form, lead to a coupled system of variational inequalities which at each time instance can be restated as a constrained optimization problem. We prove the well-posedness and regularity of the semi-discrete and continuous in time weak solutions, and derive the conditions under which pure phases are admitted. Moreover, we develop discretizations of the problem based on finite elements and implicit-explicit time stepping methods that can be realized efficiently. Finally, we illustrate our theoretical findings through several numerical experiments in one and two spatial dimensions that highlight the differences in features of local and nonlocal solutions and also the sharp interface properties of the nonlocal model.