From FAA's webiste:
Can I be sure that there will be no animals on my flight if an airline does not allow pets in the cabin?
No, you can't be sure. The Department of Transportation (DOT) has
rules (14 CFR part 382) (PDF) that require airlines to allow passengers to fly with their service animals in the cabin on all U.S. airlines. Service animals are not pets. They are working animals that assist persons with disabilities. There is no limit to the number of service animals that can be on any flight. Service animals do not need any health certificates to travel and they do not need to be confined in a container or cage.
What kind of general procedures do most airlines have in place?
If an airline allows you to travel with your pet in the cabin, you must follow all FAA regulations. Usually, most airlines have additional policies and procedures for you to follow to make sure that the flight is comfortable for all passengers on the airplane. These additional procedures may include
A limited list of the types of pets that you can bring into the cabin
A limit on the number of pets in the cabin
A limit on the number of pets that may accompany you on the airplane
A requirement that your pet be harmless, inoffensive and odorless
A requirement that your pet remain in the container for the entire flight
A requirement that you be able to produce a recently issued health certificate for your pet
Because service dogs aren't considered pets they aren't required to stay in the container for the entire flight, so if you have the documentation stating that he is a service animal then they can't force you to keep him locked up. Service dogs are trained to provide a service for their human handler, and most if not all cannot do that from inside their container.
Because your dog was just a puppy at the time, and I assume was not yet a service dog, the air crew were correct in making you keep him in his container. Pets are much more unpredictable, especially when in a stressful situation like flying. Personally, I know Rizzo is much more comfortable in his carrier than he is exposed to all sorts of strangers and he would likely freak out.
Just saying, don't get mad at the aircrew for enforcing the rules that are in place for the safety of the passengers and even for your pet. Imagine a flight where you have a 5lb dog freaking out, running under the seats and you're trying to catch him and get him under control. It would be chaos and that is something that no passenger would want to deal with on a flight.