If she was illegitimate, there could be a record of the event in the minutes of the Kirk Session of the parish where she was born, or perhaps her mother's parish of residence. This could perhaps provide some more information about William Milne, which is such a common name that you cannot expect to find the right one without additional information.
The Kirk Session minutes are in the National Archives Records of Scotland in Edinburgh. They have been digitised but are not available online. You either have tyo go there in person, or to one of the local archives that have access to them (Glasgow, Aberdeen, others?), or get someone to do so on your behalf.
This is an example from my own tree which enabled me to pinpoint the correct father from several possible candidates: "New Monkland, 6th June 1831. Compeared RS from Airdrie confessing that she was with child in fornication and having been solemnly charged and interrogated she accused GW son of JW in Dalmacoulter as the person guilty with her and the father of her child. Being farther interrogated she stated that this child was begotten in the beginning of January last in Bridenhill Barn where she was then living. GW was ordered to be cited to next Meeting of Session to which RS was cited apud acta. [New Monkland Kirk Session Minutes, National Archives of Scotland CH2/685/3/45]" (Full names in original replaced by initials)