Yes. Cape Cod Rail Trail is fairly flat and easy to walk. The trail is open daily from dawn to dusk. Alcohol and littering are not allowed on the trail. The Trail is managed and owned by Massachusetts state, not the National Park Service.
If you are 16 years old or younger, you are required to wear a bike helmet on Cape Cod National Seashore trails and roads. They are recommended for adults as well, but not mandatory. Remember to ride on the right side, and obey all traffic laws.