How can I make a site hosted on Dreamhost secure, so that it can be accessed only through https? Do I need a dedicated I.P. address for that?
Yep, you need a dedicated IP address plus a certificate.
Https provides traffic encryption, which is a piece of security puzzle. Encryption is not enough to make a site secure.
If you are writing your own web application, you may want to take a look at the information at this site.