It's perfectly legal to apply for planning permission for any property which you have a speculative interest in. If it wasn't, a large number of property deals would never take place. e.g. a company like J D Wetherspoon might be interested in making an offer to purchase a shop or cinema, with the intention of converting it to a pub. They wouldn't consider making an offer for the property unless they'd already received planning permission (at least at outline level) for the change of use. They could apply for planning permission even if the property wasn't advertised for sale (in the hope that they could make a sufficiently tempting offer to the owner of the property). They wouldn't even need to advise the owner (although, of course, the owner would be notified by the planning authority).
Similarly, I might be interested in making an offer for your house (even though you've not advertised it for sale). However, I might only be interested if I could get planning permission to convert the attic to a granny flat and to build a covered swimming pool at the rear. It would probably make most sense to speak to you first (to see if you'd be prepared to consider an offer to sell) but, if I so chose, I could simply apply for planning permission and then, if successful, approach you afterwards.
Online planning application forms, such as this one from North Yorkshire CC, specifically include a category for a 'speculative' application:
http://212.140.128.182/NYICTP/ePlanning/Planni ngApplication.aspx
Chris