Sure. I've got a neighbor down the street with a dipole set up like that.
Some things you want to look out for, though:
If you roof is metal, or there is any metal structure under the roof, you'll want to make sure you put your antenna high enough above it to prevent interaction between them.
Support the coax well so it's not pulling on the center too hard.
A dipole is going to be bi-directional, in other words it's going to work best broadside to the antenna.
If you've got the space, time, money, set up to dipoles with a coaxial switch. Put the dipoles at 90º to each other and you can switch between them and see which one works best for the specific conditions.