Yes it's okay for a 2 year old to still drink from a baby bottle.
As long as the 2 year old is getting enough fluids and enough milk by drinking from the baby bottle then it's okay.
A baby bottle although made for feeding babies can still be used by any age of a toddler, kid etc if they want too drink from it.
My own oldest son would only drink his milk when it was in a baby bottle until he was 8 years old and he refused to drink any milk unless it was in a baby bottle.
So I gave in and just let him have the bottle as he seemed more relaxed as he would drink his milk from the bottle while laying in bed or on the couch watching TV.
He gave the bottle up completely by age 9 years old.
He could drink from a cup just fine but it was only milk that he wanted in the bottle.
There was no harm done.
A baby bottle is just a bottle with a latex or silicone nipple on it that uses the sucking motion to drink from.
It's really no different than drinking from a sports bottle.