Yes, the piano was invented somewhere around 1720. However keyboard instruments have been around for a lot longer, and therefore you can play any piece written for a keyboard instrument in a piano (unless you are a boring purist).
The oldest keyboard instrument is the organ which has been around since Roman times. Then we have virginals, spinets, harpsichords, clavicytheriuns, clavichords. There is quite a wealth of music written for these instruments – interchangeably: you can play it in any of those, since the composers at the time did not know what would be available.
Two famous collections of early keyboard music are the “Fitzwilliam Virginal book” (published in modern notation by Dover) which has music of several composers, and
“My Ladye Newells booke of Virginal music”, a collection of pieces by William Byrd. (also published by Dover).
All the composers I mentioned wrote for keyboard, so you can find pieces by all of them. And of course there is no reason not to play the stuff on the piano.
This is strange music because it follows very different conventions from the ones we are used to. On first hearing, it all sounds exceedingly dull, but trust me, you will grow into it. With repeated hearing you will get used to the idiom and may even develop a taste for it (I must say it is not my favourite kind of music though)
For one thing it is not based on major/minor scales, but on modes. There is much less dissonance, so the concept of tension/resolution although it exists is much more subdued.
Finally this is polyphonic music: strands of melody being weaved together, rather than one melody with accompaniment.
Most of this music was pretty much lost until the Early Music movement started, which means that at this very moment in history we are very fortunate to be able to listen to all this stuff (just go to the early music section in any CD store), and to play it, since scores in modern notation are widely available now (not only Dover publishes a lot of the stuff, as Koneman and others as well – you may even find some of it on the internet).
The first piece ever composed (published in 1731) specifically for the piano was Ludovico Giustini’s “Sonata for soft and loud harpsichord, commonly called the mallet harpsichord”
Giustini went on to write twelve sonatas for the new instrument, and in his scores it is the first time dynamic markings (p and f ) are used. They are not sonatas in the sense of the word in the classical period, but rather like Scarlatti sonatas. The name sonata is used to mean that the piece is to be “sounded” (from the Italian “sonare” – to sound) rather than sung (in which case it would be a “cantata” – from the Italian “cantare”: to sing). They are quite nice.
For a time the piano and harpsichord co-existed, but the piano only really took off after 1760, mostly thanks to J.C.Bach (J. S.’s son) who championed it in the English Court (he was the music director for Queen Charlotte – German by birth and crazy for all things musical)
The rest, as they say, is history.

Best wishes,
Bernhard.