Yes, it is doable and can be a lot of fun. The ideal arrangement is for a small group of people to play with a storyteller (DM) and players, although you may play D&D alone, with a buddy, with a few people without a DM, or with a large group. There are even modules and programs dedicated to this goal.
The key thing is that everyone has a say in the outcome of the game. You can't just tell the DM what to do and then watch him or her roll dice to see what happens. Everyone has a role to play in creating the experience. A good DM will make sure all this information gets passed on so everyone knows their part.
It's also worth mentioning that some DMs may want more control over their games. If this is the case for you or someone you know, don't be afraid to let them know they can always drop out at any time. No one should feel forced to continue with a game that isn't making them happy.
Finally, remember that your DM is there to help you have an awesome time playing D&D, not to judge you if you make a mistake. We all make mistakes, but that shouldn't affect your ability to keep playing together.
Yes, the DM is allowed to have a player character. As someone who regularly plays in small groups (sometimes with only one other player), I frequently take on the role of a character when DMing. When creating what is known as a GMPC, there are a few hazards to be wary of (or more specifically to D&D, a DMPC). The first is over-leveling it; making your PC significantly stronger than everyone else's. This can easily happen if the DM allows their character to gain experience faster than others. A second hazard is under-leveling it; making your PC significantly weaker than everyone else's. Again, this can occur if the DM allows their character to lose experience points faster than others. A third hazard is having two DMPCs; both playing their characters at different levels. This can also lead to problems such as one PC being significantly stronger than the others.
If you feel like you might want to play a DM character sometimes, ask your peers for advice before making your character. There are many good reasons why people play D&D: some like the story lines, others may just want to beat up goblins all day every day. However, some players may see you playing a DM character and worry that you will make bad calls during adventures or treat encounters unfairly. If this concerns you, then don't play a DM character. Instead, find other players who want to play D&D but don't want to deal with the responsibility of being a DM.
Two-person D&D is not only viable, but also a means to connect with the role-playing game in a more intimate way, as long as you can overcome the potential for discomfort. It's not as lonely as it sounds to have one-on-one D & D. Dungeons & Dragons is, by definition, a communal experience.
You can play two-person D&D at any level from 5 all the way up through the highest levels of gameplay. The number of players affects how many characters can exist at any given time; usually there are maximum numbers of either player or character slots open. As long as you understand this, playing two-person D&D should be easy to manage even with a large group.
The first thing you need to do is decide on a format for your games. Are they one-hour sessions, or will they be split up over several days? One-hour games tend to be less structured and allow for more freedom, which some people enjoy. If you want to plan out an entire campaign or adventure series, that's great too. Just make sure everyone agrees on what kind of game will be played before you start.
Now that you know how many players are involved, you can choose their roles. There are different options here depending on whether you want each player to have a character or not.