Yes, but you have to logout of one, and login to the other.
If it is an iPhone/iPad/iPod Touch and you buy apps on different accounts, when it comes time to update an app, you have to specify the password for the account used to acquirer the app. You change an iOS account via Settings -> Store -> Apple ID (tap on it), and start by logging out and then you can enter the other Id
So it is possible, but it can also be a pain.
You can actually be logged in to 1 appleID in itunes and app stores, and a second appleID in iCloud. This would allow you to have separate id's for your purchases and your contacts/calendars/etc.
As Bobharris stated above, you can sign in on multiple id's but you would have to reenter your password for each one to update any application associated with that specific ID.