Dear Sumit, many thanks for sharing this very interesting technical question on RG. In addition to the expert aswer provided by Abdelkader BOUAZIZ please also have a look at the following potentially useful article. Here the authors measured nitrate levels spectrophotometrically based on the Griess assay method. Suitable nitrate / nitrite assay kits are commercially available:
Spectrophotometric Evaluation of Potassium Nitrate Penetration Into the Pulp Cavity
Article Spectrophotometric Evaluation of Potassium Nitrate Penetrati...
This article is freely available as public full text on RG. Thus it can be downloaed as pdf file.
Especially for KNO3 determination please also see the following relevant research paper:
Simultaneous Determination of Potassium and Nitrate Ions in Mouthwashes using Sequential Injection analysis with Potentiometric Detection
https://www.researchgate.net/publication/279863035_Spectrophotometric_Evaluation_of_Potassium_Nitrate_Penetration_Into_the_Pulp_Cavity,this link may be useful.