This would only work if the resources have literally no alternative uses (e.g. think of mana that according to the Judeo-Christian mythology could be only just used for immediate nourishment or it would just quickly spoil and bred worms, hence it had no other uses and could not even be saved or traded).
However, this does not hold in traditional PPF analysis. Usually PPF will look like the picture below (picture taken from Wikipedia). In such case there is always an opportunity cost. If you start at point A and move to point B on the PPF there is an opportunity cost, because instead of moving to B you could move to D. The opportunity cost of choosing allocation B is the allocation D that we forgone.
In order to get rid of opportunity cost you would have to get rid of all other options and have just one single use to which all resources can be allocated (which would be just a straight line overlapping either $y$-axis or $x$-axis). But such PPFs are not used because resources virtually always have alternative uses. In fact a proper PPF that goes beyond didactic purposes would even have more than just two dimensions, one for each good, as factors (i.e. labor, capital etc.) can be alternatively used in various production processes not just two.