If you weigh and add another pure compound to a weighed sample of the analyte, then you can compare the integrals of the two. If you had an equal molar quantity, then the area of 1H of the standard should result in an equal area to 1H of the analyte (but, normally the ratios are scaled to the actual weights and moles). The difference in area would be due to the presence of impurities. Obviously, the accuracy of the method would depend on the uniqueness of the peaks in question and the absence of absorbing impurities at the same chemical shift.