In the most Treks, not really. In DS9 a few attempts were made. Worf essentially was the Defiant's commanding officer, and he was a Lt. Commander. Dax was assigned command of the Defiant during the Dominion War, and they even adhered to tradition by calling her Captain despite her actual rank being Lt Commander. The USS Prometheus in Second Sight had a Lt. J.G. in command, though I think the intention was for him to be a Lt. Commander and Props/Costuming screwed up.
Admirals don't usually command ships. They command a task force, or carrier group or can be in command of a specific mission that a ship is on, but the ship would still have its own captain. I never made sense to me that Kirk had to be demoted to Captain and Decker to Commander in TMP, but that's another discussion.
So presumably, yes, officers of ranks lower than cpatain can command a starship, just like in actual navies of today.