The England selectors will meet on Thursday morning to select the squad for the first Investec Test against Pakistan at Lord's before it is announced later that day, and Bayliss said it would be an "interesting" meeting.
Stokes is currently making his comeback from knee surgery by playing as a batsman for Durham after being injured in the first Test against Sri Lanka, while Buttler is seeking a Test recall having been dropped against Pakistan in the UAE.
Buttler will be considered as a replacement for Jonny Bairstow behind the stumps after Bairstow's inconsistent series against Sri Lanka, but Bayliss indicated that he thought him a viable option without the gloves and also suggested that Stokes did not have to be a certainty to bowl to come into consideration.
"From my point of view, he's in contention for a batting spot if it's fit," Bayliss said of Stokes. "He's playing the next four-day game as a batsman and might, depending on how he's gone in the last few days in the nets, he might bowl some short spells. I'm just saying a guy who has made plenty of runs in Test cricket already, he has to be discussed I'm sure.
"Knowing Jos and the type of sportsman he is - whatever he's doing: darts, snooker, football, cricket - he's a game player. He could play as a bat, I'm sure. He could field, he wouldn't have too many problems at all. We saw Jonny field in these one-day games and he's a very similar sportsman as well, a good athlete, and I think Jos would be the same. He played in the IPL as a fielder. I think he could handle it."
Buttler has not played a first-class match since the Dubai Test against Pakistan in October, but Bayliss does not think that has to be a deciding factor into whether he returns to the line-up.
"Not for Jos, I don't think, the way he plays," he said. "Personally I think he'd be better in Test cricket if he played like he does in the white-ball game. That would be devastating, him coming in at six or seven and being able to play like that.
"He certainly looks like he has a lot of confidence at the moment, this series against Sri Lanka has probably been as consistent as he's played since I got here. The way he has struck the ball, the way he has carried himself, his keeping as well was pretty good, he's certainly in contention."
Alongside a decision on Stokes' fitness, an assessment will need to be made over James Anderson who has a stress fracture of his right shoulder blade. Anderson has resumed gentle bowling but Bayliss said it was a day-to-day process given the unusual nature of the injury. Jake Ball, who was in the squad throughout the Sri Lanka series, and has been rested from Nottinghamshire's current Championship match against Lancashire, would be the favourite to replace Anderson.
The batting vacancy could be filled by a straight swap of Compton for another top-order batsman, the favourite being Durham's Scott Borthwick, but if it was taken by either Stokes or Buttler it would require a reshuffle in the order which would require either Joe Root or James Vince to bat at No. 3.
Bayliss reiterated his belief that Root is England's future No. 3, but said that he thought Vince - who made a maiden international fifty in the final ODI against Sri Lanka having replaced Alex Hales - would not have a problem adjusting to the position which he holds for Hampshire in domestic cricket. Vince had a difficult start against Sri Lanka in the Tests, with 54 runs in four innings, but seems certain to retain his place.
"Long term, I think Root is our No. 3," Bayliss said. "Rooty would have to want to do it, it's a big change and he's done well at No. 4. My way of thinking is you put your best batter at No. 3. But from what I've seen of Vince, I think he could handle No. 3 also. In a way he's a similar style of player to Rooty, a classical player, plays nice and straight, so there's no reason why he couldn't make a success of No. 3."