No. You will not know it is a Ditto until after you catch the Pokemon. A dialog will pop up with "Oh?" and a short cutscene will play showing the Pokemon turn into a Ditto.
See this GamePress article on Ditto mechanics:
There is no way to know whether you have encountered a Ditto until you try catching it. Its target ring colors is faked to match the catch rate of its disguise.
Ditto has a Base Capture Rate (BCR) of 16%, among the lowest in-game for an unevolved Pokemon. In comparison, the common Pokemon it disguises as all have BCR of 40% or 56%. This means Ditto is 3-4 times harder to catch. If you throw an excellent curved Ultra Ball and that Pidgey still breaks out, it might be a Ditto (or knowing your luck, it might not).
Thus, there is no way to tell beforehand, unfortunately. The most telling indicator is that your Pidgey or Rattata is uncannily difficult to catch (but it could also just be a case of bad luck).