Phase detect autofocus works by measuring the horizontal displacement between brightness patterns projected onto the AF sensor. To measure the displacement, pairs of 1-dimensional arrays of monochrome pixels are used. This is what the AF sensor in the Canon 5D mkIII looks like:
You can see lots of different lines of pixels used by different user selectable AF points. In principle you could use lines of pixels on the main image sensor to do exactly the same job.
This approach has a few advantages:
You don't run into any problems if the main image sensor and AF sensor are misaligned, since they're one and the same.
You avoid the complexity of the secondary mirrors and the cost of the AF chip itself.
There are drawbacks to using the main sensor.
In a comment below the linked answer it is noted that the AF sensor requires a lens to focus beams of light on the appropriate location of the sensor as it is smaller than the main sensor (italics is my own assumption)
Your assumption is not quite right. It's not to do with having a smaller AF sensor, the AF "lenses" are actually one lens with a wavey 'B' shaped profile. This lens focusses light coming from either side of the lens onto different parts of the AF sensor.
You would still need some sort of lens to do this job when using the main image sensor, and it would have to swing out of the way when taking a photograph along with the reflex mirror, requiring a complicated mechanical arrangement within the camera. This is the main drawback with this approach, though there are other obstacles:
The image sensor pixels are behind colour filter arrays which reduce the amount of light that reaches them by up to two thirds. This could potentially reduce performance in low light however it would enable you to perform the phase measurement matching in colour for fewer false results (you're less likely to mistake one piece of detail from the foreground with a piece of detail from the background for example. Also colour can be used to aid tracking).
The size, spacing and sensitivity of pixels will be different between the two sensors, so doing both with one sensor means compromises have to be made.
The main sensor would have to be on for much longer periods, causing more energy to drain from the batteries. As Stan points out the shutter would also have to be open during AF so closing it prior to making the exposure would introduce a delay.
Finally phase detect AF pre-dates digital image sensors so all the of the technology and tooling to perform AF using a separate sensor already exists and is well developed.
However manufacturers have developed a slightly different method for phase detect AF which does use the main sensor. It was developed for mirrorless cameras which don't have the option of a dedicated AF sensor and which have traditionally relied on the slower contrast detect method using the main sensor.
Instead of a pair of AF lenses in the light path to direct light from either side of the lens onto different parts of the AF sensor, pairs of regular microlenses with alternate halves blacked out can be used to get a similar effect (pixels with the left half blanked will mostly receive light from the right side of the lens and vice versa).
This enables a hybrid AF approach using a combination of phase (to get close to the right focus) and contrast detection (to finetune the result).